优化后,再次提交
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "sanchayibaoguang",
|
||||
"appid" : "__UNI__91B71D4",
|
||||
"appid" : "__UNI__2C5B18C",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
@@ -65,7 +65,7 @@
|
||||
// "usingComponents" : true
|
||||
// },
|
||||
"mp-weixin" : {
|
||||
"appid" : "wxe3533791db8a8734",
|
||||
"appid" : "wxe47f34ddf7372ffb",
|
||||
"mergeVirtualHostAttributes" : true,
|
||||
"usingComponents" : true,
|
||||
"setting" : {
|
||||
|
||||
20
pages.json
@@ -11,7 +11,9 @@
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "三查一曝光"
|
||||
"navigationBarTitleText": "三查一曝光",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -245,26 +247,26 @@
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "首页",
|
||||
"iconPath": "static/tabBar/home1.png",
|
||||
"selectedIconPath": "static/tabBar/home.png"
|
||||
"iconPath": "static/tabbar_icon/home_icon.png",
|
||||
"selectedIconPath": "static/tabbar_icon/home_selectedIcon.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/map/map",
|
||||
"text": "一张图",
|
||||
"iconPath": "static/tabBar/map.png",
|
||||
"selectedIconPath": "static/tabBar/map1.png"
|
||||
"iconPath": "static/tabbar_icon/address_icon.png",
|
||||
"selectedIconPath": "static/tabbar_icon/address_selectedIcon.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/Inspectionwarning/Inspectionwarning",
|
||||
"text": "预警",
|
||||
"iconPath": "static/tabBar/warning.png",
|
||||
"selectedIconPath": "static/tabBar/warning1.png"
|
||||
"iconPath": "static/tabbar_icon/yujing_icon.png",
|
||||
"selectedIconPath": "static/tabbar_icon/yujing_selectedIcon.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/personalcenter/my",
|
||||
"text": "我的",
|
||||
"iconPath": "static/tabBar/my.png",
|
||||
"selectedIconPath": "static/tabBar/my1.png"
|
||||
"iconPath": "static/tabbar_icon/mine_icon.png",
|
||||
"selectedIconPath": "static/tabbar_icon/mine_selectedIcon.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 新增按钮 -->
|
||||
<button class="add-btn cuIcon-add bg-blue round" @click="openAddPopup">+ 新增</button>
|
||||
<button class="add-btn cuIcon-add bg-blue round" @click="openAddPopup">新增</button>
|
||||
|
||||
<!-- 新增/编辑证照弹窗 -->
|
||||
<u-popup :show="showAddPopup" mode="center" round="20" @close="closePopup">
|
||||
@@ -181,7 +181,7 @@ import {
|
||||
updateLicense,
|
||||
deleteLicense
|
||||
} from '@/request/three_one_api/license.js';
|
||||
import { baseUrl, getToken } from '@/request/request.js';
|
||||
import { getToken, toImageUrl } from '@/request/request.js';
|
||||
|
||||
// 证照列表
|
||||
const licenseList = ref([]);
|
||||
@@ -228,8 +228,7 @@ onMounted(() => {
|
||||
// 获取图片完整URL
|
||||
const getImageUrl = (path) => {
|
||||
if (!path) return '';
|
||||
if (path.startsWith('http')) return path;
|
||||
return baseUrl + path;
|
||||
return toImageUrl(path);
|
||||
};
|
||||
|
||||
// 预览图片
|
||||
|
||||
@@ -102,6 +102,12 @@
|
||||
<up-upload :fileList="hazardFileList" @afterRead="afterRead" @delete="deletePic" name="1" multiple
|
||||
:maxCount="10"></up-upload>
|
||||
<view class="text-gray text-sm">必填:请上传现场照片或者视频作为隐患证据</view>
|
||||
<view class="ai-btn-wrapper margin-top">
|
||||
<button class="ai-analyze-btn" :loading="aiAnalyzing" :disabled="aiAnalyzing" @click="handleAiAnalyze">
|
||||
<text v-if="!aiAnalyzing" class="cuIcon-magic ai-btn-icon"></text>
|
||||
{{ aiAnalyzing ? 'AI识别中...' : 'AI 识别隐患' }}
|
||||
</button>
|
||||
</view>
|
||||
<view class="flex margin-bottom margin-top">
|
||||
<view class="text-gray">隐患标题</view>
|
||||
<view class="text-red">*</view>
|
||||
@@ -112,8 +118,14 @@
|
||||
<view class="text-gray">隐患等级</view>
|
||||
<view class="text-red">*</view>
|
||||
</view>
|
||||
<up-choose v-model="hazardFormData.level" :options="levelOptions" :wrap="false" item-width="183rpx"
|
||||
item-height="72rpx"></up-choose>
|
||||
<up-choose
|
||||
ref="levelChooseRef"
|
||||
v-model="hazardFormData.level"
|
||||
:options="levelOptions"
|
||||
:wrap="false"
|
||||
item-width="183rpx"
|
||||
item-height="72rpx"
|
||||
></up-choose>
|
||||
<view class="flex margin-bottom margin-top">
|
||||
<view class="text-gray">隐患来源</view>
|
||||
<view class="text-red">*</view>
|
||||
@@ -191,9 +203,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, computed } from 'vue';
|
||||
import { ref, reactive, computed, nextTick } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { enterCheckPlan, submitCheckResult, addHiddenDanger, getHiddenDangerLabelList } from '@/request/api.js';
|
||||
import { enterCheckPlan, submitCheckResult, addHiddenDanger, getHiddenDangerLabelList, analyzeHazardImage } from '@/request/api.js';
|
||||
import { baseUrl, getToken } from '@/request/request.js';
|
||||
import { getAreaList } from '@/request/three_one_api/area.js';
|
||||
|
||||
@@ -290,6 +302,12 @@
|
||||
// 隐患附件列表
|
||||
const hazardFileList = ref([]);
|
||||
|
||||
// up-choose 组件的 ref
|
||||
const levelChooseRef = ref(null);
|
||||
|
||||
// AI 识别相关
|
||||
const aiAnalyzing = ref(false);
|
||||
|
||||
// 是否已填写隐患数据
|
||||
const hasHazardData = computed(() => {
|
||||
return hazardFormData.title && hazardFileList.value.length > 0;
|
||||
@@ -427,11 +445,13 @@
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
const result = await uploadFilePromise(lists[i].url);
|
||||
let item = hazardFileList.value[fileListLen];
|
||||
const serverPath = typeof result === 'string' ? result : (result?.url || result?.path || '');
|
||||
hazardFileList.value.splice(fileListLen, 1, {
|
||||
...item,
|
||||
status: 'success',
|
||||
message: '',
|
||||
url: result,
|
||||
url: baseUrl.replace('/prod-api', '') + serverPath,
|
||||
serverPath: serverPath,
|
||||
});
|
||||
fileListLen++;
|
||||
}
|
||||
@@ -463,6 +483,57 @@
|
||||
});
|
||||
};
|
||||
|
||||
// AI 识别隐患
|
||||
const handleAiAnalyze = async () => {
|
||||
const imageFiles = hazardFileList.value.filter(f => {
|
||||
return f.status === 'success' && f.url.toLowerCase().match(/\.(jpg|jpeg|png|gif|bmp|webp)$/);
|
||||
});
|
||||
if (imageFiles.length === 0) {
|
||||
uni.showToast({ title: '请先上传隐患图片', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const fullImageUrl = imageFiles[0].url;
|
||||
|
||||
aiAnalyzing.value = true;
|
||||
try {
|
||||
console.log('开始调用AI分析接口,图片地址:', fullImageUrl);
|
||||
const analyzeRes = await analyzeHazardImage({
|
||||
imageUrl: fullImageUrl,
|
||||
});
|
||||
|
||||
if (analyzeRes.code === 0 && analyzeRes.data) {
|
||||
const aiData = analyzeRes.data;
|
||||
console.log('AI分析结果:', aiData);
|
||||
|
||||
if (aiData.title) hazardFormData.title = aiData.title;
|
||||
if (aiData.description) hazardFormData.description = aiData.description;
|
||||
|
||||
if (aiData.level) {
|
||||
const levelMap = { '轻微': 0, '轻微隐患': 0, '一般': 1, '一般隐患': 1, '重大': 2, '重大隐患': 2 };
|
||||
const levelIndex = levelMap[aiData.level];
|
||||
if (levelIndex !== undefined) {
|
||||
hazardFormData.level = levelIndex;
|
||||
nextTick(() => {
|
||||
if (levelChooseRef.value && levelChooseRef.value.$data) {
|
||||
levelChooseRef.value.$data.currentIndex = levelIndex;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
uni.showToast({ title: 'AI分析完成,已自动填充', icon: 'success', duration: 2000 });
|
||||
} else {
|
||||
uni.showToast({ title: analyzeRes.msg || 'AI分析失败', icon: 'none' });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('AI分析接口调用失败:', error);
|
||||
uni.showToast({ title: 'AI分析失败,请重试', icon: 'none' });
|
||||
} finally {
|
||||
aiAnalyzing.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
// ==================== 提交逻辑 ====================
|
||||
|
||||
// 提交检查结果
|
||||
@@ -837,6 +908,38 @@
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
// AI 识别按钮样式
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-footer {
|
||||
display: flex;
|
||||
border-top: 1rpx solid #eee;
|
||||
|
||||
@@ -168,7 +168,7 @@ const dataList = ref([])
|
||||
const pageNum = ref(1)
|
||||
const pageSize = ref(20)
|
||||
|
||||
// 日期格式化
|
||||
// 日期格式化(仅日期,用于页面显示)
|
||||
const formatDate = (timestamp) => {
|
||||
const date = new Date(timestamp)
|
||||
const year = date.getFullYear()
|
||||
@@ -177,14 +177,17 @@ const formatDate = (timestamp) => {
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
|
||||
// 日期选择确认
|
||||
// 日期选择确认(开始日期补 00:00:00)
|
||||
const onStartDateConfirm = (e) => {
|
||||
searchForm.startDate = formatDate(e.value)
|
||||
const dateStr = formatDate(e.value)
|
||||
searchForm.startDate = `${dateStr} 00:00:00`
|
||||
showStartDatePicker.value = false
|
||||
}
|
||||
|
||||
// 日期选择确认(结束日期补 23:59:59)
|
||||
const onEndDateConfirm = (e) => {
|
||||
searchForm.endDate = formatDate(e.value)
|
||||
const dateStr = formatDate(e.value)
|
||||
searchForm.endDate = `${dateStr} 23:59:59`
|
||||
showEndDatePicker.value = false
|
||||
}
|
||||
|
||||
|
||||
@@ -78,6 +78,12 @@
|
||||
></up-picker>
|
||||
<view class="margin-bottom margin-top">主要负责人</view>
|
||||
<up-input v-model="formData.responsiblePerson" placeholder="请输入主要负责人"></up-input>
|
||||
<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>
|
||||
@@ -96,7 +102,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { getMyWriteOffList, applyDelete, getAcceptanceList, getDepartmentPersonUsers } from '@/request/api.js';
|
||||
import { getMyWriteOffList, applyDelete, getAcceptanceList, getDepartmentPersonUsers, getHiddenDangerDetail, getRectifyDetail, generateWriteoffContent } from '@/request/api.js';
|
||||
|
||||
// 弹窗控制
|
||||
const showAddPopup = ref(false);
|
||||
@@ -120,6 +126,9 @@
|
||||
// 日期选择
|
||||
const dateValue = ref(Date.now());
|
||||
|
||||
// AI生成状态
|
||||
const aiGenerating = ref(false);
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
rectifyDeadline: '', // 整改时限
|
||||
@@ -259,6 +268,61 @@
|
||||
formData.selfVerifyContent = '';
|
||||
};
|
||||
|
||||
// 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) {
|
||||
@@ -369,6 +433,37 @@
|
||||
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;
|
||||
|
||||
@@ -62,6 +62,12 @@
|
||||
<up-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
|
||||
:maxCount="10"></up-upload>
|
||||
<view class="text-gray text-sm">必填:请上传现场照片或者视频作为隐患证据</view>
|
||||
<view class="ai-btn-wrapper margin-top">
|
||||
<button class="ai-analyze-btn" :loading="aiAnalyzing" :disabled="aiAnalyzing" @click="handleAiAnalyze">
|
||||
<text v-if="!aiAnalyzing" class="cuIcon-magic ai-btn-icon"></text>
|
||||
{{ aiAnalyzing ? 'AI识别中...' : 'AI 识别隐患' }}
|
||||
</button>
|
||||
</view>
|
||||
<view class="flex margin-bottom margin-top">
|
||||
<view class="text-gray">隐患标题</view>
|
||||
<view class="text-red">*</view>
|
||||
@@ -72,8 +78,14 @@
|
||||
<view class="text-gray">隐患等级</view>
|
||||
<view class="text-red">*</view>
|
||||
</view>
|
||||
<up-choose v-model="formData.level" :options="levelOptions" :wrap="false" item-width="183rpx"
|
||||
item-height="72rpx"></up-choose>
|
||||
<up-choose
|
||||
ref="levelChooseRef"
|
||||
v-model="formData.level"
|
||||
:options="levelOptions"
|
||||
:wrap="false"
|
||||
item-width="183rpx"
|
||||
item-height="72rpx"
|
||||
></up-choose>
|
||||
<view class="flex margin-bottom margin-top">
|
||||
<view class="text-gray">隐患来源</view>
|
||||
<view class="text-red">*</view>
|
||||
@@ -155,7 +167,9 @@
|
||||
ref,
|
||||
computed,
|
||||
reactive,
|
||||
watch
|
||||
watch,
|
||||
nextTick,
|
||||
getCurrentInstance
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad,
|
||||
@@ -166,7 +180,8 @@
|
||||
enterCheckPlan,
|
||||
getCheckTaskDetail,
|
||||
getMyHiddenDangerList,
|
||||
getHiddenDangerLabelList
|
||||
getHiddenDangerLabelList,
|
||||
analyzeHazardImage
|
||||
} from '@/request/api.js'
|
||||
import { getAreaList } from '@/request/three_one_api/area.js'
|
||||
import {
|
||||
@@ -177,6 +192,9 @@
|
||||
// 弹窗控制
|
||||
const showAddPopup = ref(false);
|
||||
|
||||
// up-choose 组件的 ref
|
||||
const levelChooseRef = ref(null);
|
||||
|
||||
// 获取用户角色,判断是否有验收权限(admin或manage才能验收)
|
||||
const userRole = ref('');
|
||||
const canAcceptance = computed(() => {
|
||||
@@ -237,6 +255,9 @@
|
||||
source: '', // 隐患来源
|
||||
});
|
||||
|
||||
// 用于强制刷新 up-choose 组件的 key
|
||||
const levelChooseKey = ref(0);
|
||||
|
||||
// 经纬度
|
||||
const lng = ref(0);
|
||||
const lat = ref(0);
|
||||
@@ -357,20 +378,12 @@
|
||||
return;
|
||||
}
|
||||
|
||||
// 构建附件列表 - 从上传返回的url中提取文件名
|
||||
const attachments = fileList1.value.map(file => {
|
||||
// 确保 url 是字符串
|
||||
let url = '';
|
||||
if (typeof file.url === 'string') {
|
||||
url = file.url;
|
||||
} else if (file.url && typeof file.url === 'object') {
|
||||
url = file.url.url || file.url.path || '';
|
||||
}
|
||||
// 从url中提取文件名
|
||||
const fileName = (typeof url === 'string' && url) ? url.split('/').pop() : (file.name || '');
|
||||
const path = file.serverPath || '';
|
||||
const fileName = path ? path.split('/').pop() : (file.name || '');
|
||||
return {
|
||||
fileName: fileName || '',
|
||||
filePath: url || '',
|
||||
filePath: path,
|
||||
fileType: file.type || 'image/png',
|
||||
fileSize: file.size || 0
|
||||
};
|
||||
@@ -511,11 +524,14 @@
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
const result = await uploadFilePromise(lists[i].url);
|
||||
let item = fileList1.value[fileListLen];
|
||||
const serverPath = typeof result === 'string' ? result : (result?.url || result?.path || '');
|
||||
fileList1.value.splice(fileListLen, 1, {
|
||||
...item,
|
||||
status: 'success',
|
||||
message: '',
|
||||
url: result,
|
||||
// url: baseUrl + serverPath,
|
||||
url: baseUrl.replace('/prod-api', '') + serverPath,
|
||||
serverPath: serverPath,
|
||||
});
|
||||
fileListLen++;
|
||||
}
|
||||
@@ -545,6 +561,59 @@
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// AI 识别隐患
|
||||
const aiAnalyzing = ref(false);
|
||||
const handleAiAnalyze = async () => {
|
||||
const imageFiles = fileList1.value.filter(f => {
|
||||
return f.status === 'success' && f.url.toLowerCase().match(/\.(jpg|jpeg|png|gif|bmp|webp)$/);
|
||||
});
|
||||
if (imageFiles.length === 0) {
|
||||
uni.showToast({ title: '请先上传隐患图片', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const fullImageUrl = imageFiles[0].url;
|
||||
|
||||
aiAnalyzing.value = true;
|
||||
try {
|
||||
console.log('开始调用AI分析接口,图片地址:', fullImageUrl);
|
||||
const analyzeRes = await analyzeHazardImage({
|
||||
// imageUrl: 'https://yx.zhihuixiangxi.com:58880/1.png' ,
|
||||
imageUrl: fullImageUrl ,
|
||||
});
|
||||
|
||||
if (analyzeRes.code === 0 && analyzeRes.data) {
|
||||
const aiData = analyzeRes.data;
|
||||
console.log('AI分析结果:', aiData);
|
||||
|
||||
if (aiData.title) formData.title = aiData.title;
|
||||
if (aiData.description) formData.description = aiData.description;
|
||||
|
||||
if (aiData.level) {
|
||||
const levelMap = { '轻微': 0, '轻微隐患': 0, '一般': 1, '一般隐患': 1, '重大': 2, '重大隐患': 2 };
|
||||
const levelIndex = levelMap[aiData.level];
|
||||
if (levelIndex !== undefined) {
|
||||
formData.level = levelIndex;
|
||||
nextTick(() => {
|
||||
if (levelChooseRef.value && levelChooseRef.value.$data) {
|
||||
levelChooseRef.value.$data.currentIndex = levelIndex;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
uni.showToast({ title: 'AI分析完成,已自动填充', icon: 'success', duration: 2000 });
|
||||
} else {
|
||||
uni.showToast({ title: analyzeRes.msg || 'AI分析失败', icon: 'none' });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('AI分析接口调用失败:', error);
|
||||
uni.showToast({ title: 'AI分析失败,请重试', icon: 'none' });
|
||||
} finally {
|
||||
aiAnalyzing.value = false;
|
||||
}
|
||||
};
|
||||
const tagOptions = ref([]);
|
||||
const fetchTagOptions = async () => {
|
||||
try {
|
||||
@@ -684,6 +753,37 @@
|
||||
color: #F5222D;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
width: 600rpx;
|
||||
background: #fff;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
import { ref, reactive } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { acceptanceRectification, getHiddenDangerDetail } from '@/request/api.js';
|
||||
import { baseUrl,getToken } from '@/request/request.js';
|
||||
import { baseUrl, getToken, toImageUrl } from '@/request/request.js';
|
||||
|
||||
// 页面参数
|
||||
const rectifyId = ref('');
|
||||
@@ -75,9 +75,9 @@
|
||||
const getFullPath = (filePath) => {
|
||||
if (!filePath) return '';
|
||||
if (filePath.startsWith('http://') || filePath.startsWith('https://')) {
|
||||
return filePath;
|
||||
return toImageUrl(filePath);
|
||||
}
|
||||
return baseUrl + filePath;
|
||||
return toImageUrl(filePath);
|
||||
};
|
||||
|
||||
// 图片预览
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
<template>
|
||||
<view class="page padding">
|
||||
<view class="padding bg-white radius">
|
||||
<view class="form-label margin-bottom">
|
||||
<view class="form-header margin-bottom">
|
||||
<view class="form-label">
|
||||
<view class="text-gray">整改方案</view>
|
||||
<view class="text-red">*</view>
|
||||
</view>
|
||||
<up-textarea v-model="formData.rectifyPlan" placeholder="请输入内容"></up-textarea>
|
||||
<button class="ai-rectify-btn" :loading="aiGenerating" :disabled="aiGenerating" @click="handleAiGenerate">
|
||||
<text v-if="!aiGenerating" class="cuIcon-magic ai-btn-icon"></text>
|
||||
{{ aiGenerating ? 'AI生成中...' : 'AI生成整改方案' }}
|
||||
</button>
|
||||
</view>
|
||||
<up-textarea v-model="formData.rectifyPlan" placeholder="请输入内容" :maxlength="-1" autoHeight></up-textarea>
|
||||
<view class="form-label margin-bottom margin-top">
|
||||
<view class="text-gray">整改完成情况</view>
|
||||
<view class="text-red">*</view>
|
||||
@@ -78,7 +84,7 @@
|
||||
<script setup>
|
||||
import {ref,reactive,computed} from 'vue'
|
||||
import {onLoad} from '@dcloudio/uni-app'
|
||||
import {submitRectification,getDepartmentPersonUsers,getRectifyDetail,getDeptUsersWithSubordinates} from '@/request/api.js'
|
||||
import {submitRectification,getDepartmentPersonUsers,getRectifyDetail,getDeptUsersWithSubordinates,getHiddenDangerDetail,generateRectifyPlan} from '@/request/api.js'
|
||||
import {baseUrl,getToken} from '@/request/request.js'
|
||||
|
||||
// 从页面参数获取的ID
|
||||
@@ -352,6 +358,45 @@
|
||||
}
|
||||
};
|
||||
|
||||
// AI生成整改方案
|
||||
const aiGenerating = ref(false);
|
||||
const handleAiGenerate = async () => {
|
||||
if (!hazardId.value) {
|
||||
uni.showToast({ title: '缺少隐患信息', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
aiGenerating.value = true;
|
||||
try {
|
||||
const detailRes = await getHiddenDangerDetail({
|
||||
hazardId: hazardId.value,
|
||||
assignId: assignId.value
|
||||
});
|
||||
|
||||
if (detailRes.code !== 0 || !detailRes.data) {
|
||||
uni.showToast({ title: '获取隐患详情失败', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const { title, description } = detailRes.data;
|
||||
const aiRes = await generateRectifyPlan({ title, description });
|
||||
|
||||
if (aiRes.code === 0 && aiRes.data) {
|
||||
if (aiRes.data.rawResponse) {
|
||||
formData.rectifyPlan = aiRes.data.rawResponse;
|
||||
}
|
||||
uni.showToast({ title: 'AI生成完成', icon: 'success', duration: 2000 });
|
||||
} 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;
|
||||
}
|
||||
};
|
||||
|
||||
onLoad((options) => {
|
||||
if (options.hazardId) {
|
||||
hazardId.value = options.hazardId;
|
||||
@@ -379,7 +424,42 @@
|
||||
background: #EBF2FC;
|
||||
}
|
||||
|
||||
// 表单标签样式 - 让*号和文字对齐
|
||||
.ai-rectify-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 60rpx;
|
||||
padding: 0 24rpx;
|
||||
margin: 0;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
background: linear-gradient(135deg, #4facfe 0%, #2668EA 100%);
|
||||
border-radius: 30rpx;
|
||||
border: none;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ai-btn-icon {
|
||||
margin-right: 6rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
.form-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
import { ref, reactive } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { getHiddenDangerDetail } from '@/request/api.js'
|
||||
import { baseUrl } from '@/request/request.js'
|
||||
import { toImageUrl } from '@/request/request.js'
|
||||
|
||||
// 详情数据
|
||||
const detailData = reactive({
|
||||
@@ -89,13 +89,7 @@
|
||||
|
||||
// 获取完整图片路径
|
||||
const getFullPath = (filePath) => {
|
||||
if (!filePath) return '';
|
||||
// 如果已经是完整路径则直接返回
|
||||
if (filePath.startsWith('http://') || filePath.startsWith('https://')) {
|
||||
return filePath;
|
||||
}
|
||||
// 拼接 baseUrl
|
||||
return baseUrl + filePath;
|
||||
return toImageUrl(filePath);
|
||||
};
|
||||
|
||||
// 图片预览 - 隐患图片
|
||||
|
||||
@@ -1,60 +1,77 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="flex padding-top-xl padding-bottom-xl text-white " style="background-color:#007aff ;">
|
||||
<view class="cu-avatar xl round margin-left">
|
||||
<!-- 顶部背景区域 -->
|
||||
<view class="header-wrapper">
|
||||
<!-- 渐变图片叠加在蓝色底色上 -->
|
||||
<image class="header-bg-image" src="/static/home_icon/jianbianbeijing.png" mode="aspectFill"></image>
|
||||
<!-- 自定义导航栏 -->
|
||||
<u-navbar
|
||||
title="三查一曝光"
|
||||
:placeholder="false"
|
||||
:fixed="false"
|
||||
:safeAreaInsetTop="true"
|
||||
bgColor="transparent"
|
||||
titleColor="#fff"
|
||||
:border="false"
|
||||
leftIcon=""
|
||||
>
|
||||
</u-navbar>
|
||||
|
||||
<!-- 用户信息卡片 -->
|
||||
<view class="user-card">
|
||||
<view class="user-avatar">
|
||||
<image class="avatar-image" :src="getImageUrl(userInfo.avatar) || defaultAvatar" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="padding-left" style="display: flex;flex-direction: column;gap: 10rpx;justify-content: center;align-items: center;">
|
||||
<view class="text-bold">{{ userInfo.deptName || '未知部门' }}</view>
|
||||
<view class="flex padding-top-xs">
|
||||
<view>用户:</view>
|
||||
<view>{{ userInfo.nickName || userInfo.username || '未登录' }}</view>
|
||||
<view class="user-info">
|
||||
<view class="user-dept text-bold">{{ userInfo.deptName || '未知部门' }}</view>
|
||||
<view class="user-phone">手机号:{{ userInfo.phone || '未绑定' }}</view>
|
||||
</view>
|
||||
<!-- <view class="flex justify-between">
|
||||
<view></view>
|
||||
<view class="cu-btn text-blue margin-top text-bold">切换</view>
|
||||
<!-- <view class="switch-btn">
|
||||
<text>切换</text>
|
||||
<u-icon name="list" color="#285CE9" size="14"></u-icon>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding page-content" style="background: #EBF2FC;">
|
||||
<view class="bg-white padding radius">
|
||||
<view class="flex margin-bottom-xl">
|
||||
<view class="border-tite"></view>
|
||||
<view class="margin-left-xs text-bold " >功能菜单</view>
|
||||
</view>
|
||||
<view class=" grid col-3 grid-square">
|
||||
<view class="list " v-for="(item, index) in infoList" :key="index" @click="handleMenuClick(item)">
|
||||
<image style="width: 102rpx;height: 102rpx;" :src="item.src"></image>
|
||||
<view>{{ item.name}}</view>
|
||||
|
||||
<view class="padding page-content">
|
||||
<!-- 功能菜单 -->
|
||||
<view class="menu-card">
|
||||
<view class="menu-grid">
|
||||
<view class="menu-item" v-for="(item, index) in infoList" :key="index" @click="handleMenuClick(item)">
|
||||
<image class="menu-icon" :src="item.src"></image>
|
||||
<text class="menu-text">{{ item.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 我的检查计划 -->
|
||||
<view class="padding bg-white margin-top radius">
|
||||
<view class="bg-white margin-top radius" style="padding: 40rpx; margin-left: -30rpx; margin-right: -30rpx;">
|
||||
<view class="flex margin-bottom-xl">
|
||||
<view class="border-tite"></view>
|
||||
<view class="text-bold margin-left-xs">我的检查计划</view>
|
||||
<!-- <view class="border-tite"></view> -->
|
||||
<view class="text-bold margin-left-xs" style="font-size: 32rpx;">我的检查计划</view>
|
||||
</view>
|
||||
<!-- 无数据提示 -->
|
||||
<view v-if="checkPlanData.length === 0" class="text-center text-gray padding">
|
||||
暂无检查计划
|
||||
</view>
|
||||
<!-- 列表渲染 -->
|
||||
<view class="list-list padding margin-bottom" v-for="(item, index) in checkPlanData" :key="item.id">
|
||||
<view class="flex">
|
||||
<image src="/static/蒙版组 273.png" style="width: 40rpx;height: 40rpx;"></image>
|
||||
<view class="text-bold margin-left">{{ item.name }}</view>
|
||||
<view class="plan-card margin-bottom" v-for="(item, index) in checkPlanData" :key="item.id">
|
||||
<!-- 蓝色标题栏 -->
|
||||
<view class="plan-header">
|
||||
<!-- <image src="/static/蒙版组 273.png" class="plan-header-icon"></image> -->
|
||||
<text class="plan-header-title">{{ item.name }}</text>
|
||||
</view>
|
||||
<view class="flex margin-top">
|
||||
<!-- 内容区域 -->
|
||||
<view class="plan-body">
|
||||
<view class="flex">
|
||||
<view class="border-border margin-right-xs">{{ item.runModeName }}完成</view>
|
||||
<view class="border-border">{{ item.cycle }}</view>
|
||||
</view>
|
||||
<view class="flex text-gray margin-top">
|
||||
<view>计划时间:</view>
|
||||
<view>{{ formatDate(item.planStartTime) }}至{{ formatDate(item.planEndTime) }}</view>
|
||||
<view style="color: #333333;">{{ formatDate(item.planStartTime) }}至{{ formatDate(item.planEndTime) }}</view>
|
||||
</view>
|
||||
<view class="flex margin-top align-center">
|
||||
<view>完成进度:</view>
|
||||
<view style="color: #B5B5B5;">完成进度:</view>
|
||||
<view class="flex align-center margin-left-sm">
|
||||
<view class="cu-progress round">
|
||||
<view class="bg-green" :style="{ width: item.progress + '%' }"></view>
|
||||
@@ -62,22 +79,22 @@
|
||||
<text class="margin-left-sm">{{ item.progress }}%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="grid col-4 bg-gray margin padding text-center radius">
|
||||
<view>
|
||||
<view class="text-orange">{{ item.totalCount }}</view>
|
||||
<view>总数</view>
|
||||
<view class="plan-stats margin-top">
|
||||
<view class="plan-stat-item">
|
||||
<view class="plan-stat-num text-orange">{{ item.totalCount }}</view>
|
||||
<view class="plan-stat-label">隐患</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="text-yellow">{{ item.totalCount - item.finishedCount }}</view>
|
||||
<view>待完成</view>
|
||||
<view class="plan-stat-item">
|
||||
<view class="plan-stat-num text-yellow">{{ item.totalCount - item.finishedCount }}</view>
|
||||
<view class="plan-stat-label">待整改</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="text-olive">0</view>
|
||||
<view>待验收</view>
|
||||
<view class="plan-stat-item">
|
||||
<view class="plan-stat-num text-olive">0</view>
|
||||
<view class="plan-stat-label">待验收</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="text-blue">{{ item.finishedCount }}</view>
|
||||
<view>已完成</view>
|
||||
<view class="plan-stat-item">
|
||||
<view class="plan-stat-num text-blue">{{ item.finishedCount }}</view>
|
||||
<view class="plan-stat-label">已完成</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-top margin-bottom flex justify-end">
|
||||
@@ -87,58 +104,67 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 我的隐患 -->
|
||||
<view class="padding bg-white margin-top radius" >
|
||||
<view class="flex margin-bottom-xl ">
|
||||
<view class="border-tite"></view>
|
||||
<view class="text-bold margin-left-xs">我的隐患排查</view>
|
||||
<view class="bg-white margin-top radius" style="padding: 40rpx; margin-left: -40rpx; margin-right: -40rpx;">
|
||||
<view class="flex margin-bottom">
|
||||
<!-- <view class="border-tite"></view> -->
|
||||
<view class="text-bold margin-left-xs" style="font-size: 32rpx;">我的隐患排查</view>
|
||||
</view>
|
||||
<view class="list-list padding margin-bottom" v-for="(item,index) in hiddenDangerData" :key="item.hazardId">
|
||||
<view class="flex text-bold justify-between">
|
||||
<view class="flex">
|
||||
<view>隐患</view>
|
||||
<view class="text-bold margin-left">#{{ index + 1 }}</view>
|
||||
<!-- Tab 筛选栏 -->
|
||||
<scroll-view scroll-x class="danger-tab-scroll">
|
||||
<view class="danger-tab-list">
|
||||
<view
|
||||
class="danger-tab-item"
|
||||
:class="{ 'danger-tab-active': activeDangerTab === index }"
|
||||
v-for="(tab, index) in dangerTabs"
|
||||
:key="index"
|
||||
@click="switchDangerTab(index)"
|
||||
>{{ tab }}</view>
|
||||
</view>
|
||||
<view class="text-blue">{{item.statusName}}</view>
|
||||
</scroll-view>
|
||||
<!-- 无数据提示 -->
|
||||
<view v-if="filteredDangerData.length === 0" class="text-center text-gray padding">
|
||||
暂无隐患数据
|
||||
</view>
|
||||
<view class="flex margin-top">
|
||||
<view class="text-gray">标题:</view>
|
||||
<view>{{item.title}}</view>
|
||||
<!-- 隐患卡片列表 -->
|
||||
<view class="danger-card margin-top" v-for="(item, index) in filteredDangerData" :key="item.hazardId">
|
||||
<!-- 标题行:图标+标题 + 等级标签 -->
|
||||
<view class="flex justify-between align-center">
|
||||
<view class="flex align-center">
|
||||
<text class="cuIcon-infofill text-blue" style="font-size: 36rpx; margin-right: 12rpx;"></text>
|
||||
<text class="text-bold" style="font-size: 30rpx;">{{ item.title }}</text>
|
||||
</view>
|
||||
<view class="flex margin-top">
|
||||
<view class="text-gray">隐患来源:</view>
|
||||
<view>{{item.source}}</view>
|
||||
</view>
|
||||
<view class="flex margin-top">
|
||||
<view class="text-gray" style="white-space: nowrap;">隐患位置:</view>
|
||||
<view>{{item.address}}</view>
|
||||
</view>
|
||||
<view class="flex margin-top">
|
||||
<view class="text-gray">隐患等级:</view>
|
||||
<view class="level-tag" :class="{
|
||||
'level-minor': item.levelName === '轻微隐患',
|
||||
'level-normal': item.levelName === '一般隐患',
|
||||
'level-major': item.levelName === '重大隐患'
|
||||
}">{{ item.levelName }}</view>
|
||||
</view>
|
||||
<view class="flex margin-top">
|
||||
<view class="text-gray">发现时间:</view>
|
||||
<view>{{item.createdAt}}</view>
|
||||
<!-- 地址 -->
|
||||
<view class="text-gray margin-top-sm" style="font-size: 26rpx; padding-left: 48rpx;">{{ item.address }}</view>
|
||||
<!-- 分隔线 -->
|
||||
<view style="height: 1rpx; background: #EEEEEE; margin: 20rpx 0;"></view>
|
||||
<!-- 信息行 -->
|
||||
<view class="danger-info-row">
|
||||
<text class="text-gray">隐患来源:</text>
|
||||
<text style="color: #333333;">{{ item.source }}</text>
|
||||
</view>
|
||||
<view class="margin-top margin-bottom flex justify-end" style="gap: 10rpx;">
|
||||
<!-- 所有状态都显示查看详情 -->
|
||||
<view class="danger-info-row">
|
||||
<text class="text-gray">隐患状态:</text>
|
||||
<text style="color: #333333;">{{ item.statusName }}</text>
|
||||
</view>
|
||||
<view class="danger-info-row">
|
||||
<text class="text-gray">发现时间:</text>
|
||||
<text style="color: #333333;">{{ item.createdAt }}</text>
|
||||
</view>
|
||||
<!-- 操作按钮 -->
|
||||
<view class="margin-top flex justify-end" style="gap: 16rpx;">
|
||||
<button class="cu-btn round lg light bg-blue" @click.stop="viewHazardDetail(item)">查看详情</button>
|
||||
<!-- 待整改状态:canEdit为true时显示隐患交办和立即整改 -->
|
||||
<button v-if="item.statusName === '待整改' && item.canEdit"
|
||||
class="cu-btn round lg light bg-blue" @click.stop="assignHazard(item)">隐患交办</button>
|
||||
<button v-if="item.statusName === '待整改' && item.canEdit"
|
||||
class="cu-btn round lg bg-blue" @click.stop="goRectification(item)">立即整改</button>
|
||||
<!-- 待验收显示编辑整改信息和立即验收 -->
|
||||
<button v-if="item.statusName === '待验收' && item.canEdit"
|
||||
class="cu-btn round lg light bg-blue" @click.stop="editRectification(item)">编辑整改信息</button>
|
||||
<button v-if="item.statusName === '待验收' && canAcceptance"
|
||||
class="cu-btn round lg bg-blue" @click.stop="goAcceptance(item)">立即验收</button>
|
||||
<!-- 待交办显示隐患交办 -->
|
||||
<button v-if="item.statusName === '待交办'"
|
||||
class="cu-btn round lg bg-blue" @click.stop="assignHazard(item)">隐患交办</button>
|
||||
</view>
|
||||
@@ -154,7 +180,7 @@
|
||||
import {getCheckPlanList,getHiddenDangerList} from '@/request/api.js'
|
||||
import { getProfileDetail } from '@/request/three_one_api/info.js';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { baseUrl } from '@/request/request.js';
|
||||
import { toImageUrl } from '@/request/request.js';
|
||||
const loading = ref(true);
|
||||
|
||||
const defaultAvatar = 'https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg';
|
||||
@@ -167,7 +193,8 @@
|
||||
deptId: '',
|
||||
deptName: '',
|
||||
role: '',
|
||||
avatar: ''
|
||||
avatar: '',
|
||||
phone: ''
|
||||
});
|
||||
|
||||
// 获取用户角色,判断是否有验收权限(admin或manage才能验收)
|
||||
@@ -178,8 +205,7 @@
|
||||
// 获取图片完整URL(用于显示)
|
||||
const getImageUrl = (path) => {
|
||||
if (!path) return '';
|
||||
if (path.startsWith('http')) return path;
|
||||
return baseUrl + path;
|
||||
return toImageUrl(path);
|
||||
};
|
||||
|
||||
// 获取用户信息(从接口获取)
|
||||
@@ -193,6 +219,7 @@
|
||||
userInfo.deptId = res.data.deptId || '';
|
||||
userInfo.deptName = res.data.deptName || '';
|
||||
userInfo.avatar = res.data.avatar || '';
|
||||
userInfo.phone = res.data.phonenumber || res.data.phone || '';
|
||||
// 获取角色信息
|
||||
if (res.data.roles && res.data.roles.length > 0) {
|
||||
userInfo.role = res.data.roles[0].roleKey || '';
|
||||
@@ -212,49 +239,51 @@
|
||||
userInfo.deptName = info.deptName || '';
|
||||
userInfo.role = info.role || '';
|
||||
userInfo.avatar = info.avatar || '';
|
||||
userInfo.phone = info.phone || '';
|
||||
}
|
||||
} catch (storageError) {
|
||||
console.error('从本地存储获取用户信息失败:', storageError);
|
||||
}
|
||||
}
|
||||
};
|
||||
const infoList = ref([{
|
||||
const infoList = ref([
|
||||
{
|
||||
name: '成员管理',
|
||||
src: '../../static/组 19378.png'
|
||||
src: '/static/home_icon/chengyuangaunli.png'
|
||||
},
|
||||
{
|
||||
name: '企业信息填报',
|
||||
src: '../../static/组 19387.png'
|
||||
name: '信息填报',
|
||||
src: '/static/home_icon/xinxitianbao.png'
|
||||
},
|
||||
{
|
||||
name: '区域设置',
|
||||
src: '../../static/组 20253.png'
|
||||
src: '/static/home_icon/quyushezhi.png'
|
||||
},
|
||||
{
|
||||
name: '检查表',
|
||||
src: '../../static/组 20254.png'
|
||||
name: '检查清单',
|
||||
src: '/static/home_icon/jiachaqingdan.png'
|
||||
},
|
||||
{
|
||||
name: '检查记录',
|
||||
src: '../../static/组 20255.png'
|
||||
src: '/static/home_icon/jianchajilu.png'
|
||||
},
|
||||
{
|
||||
name: '证照管理',
|
||||
src: '../../static/组 20256.png'
|
||||
name: '证件管理',
|
||||
src: '/static/home_icon/zhengjianguanli.png'
|
||||
},
|
||||
{
|
||||
name: '隐患排查',
|
||||
src: '../../static/组 20257.png'
|
||||
src: '/static/home_icon/yinhuanpaicha.png'
|
||||
},
|
||||
{
|
||||
name: '隐患销号申请',
|
||||
src: '../../static/组 20258.png'
|
||||
},
|
||||
{
|
||||
name: '设备登记',
|
||||
src: '../../static/组 20259.png'
|
||||
name: '隐患销号',
|
||||
src: '/static/home_icon/yinhuanxiaohao.png'
|
||||
}
|
||||
|
||||
// ,
|
||||
// {
|
||||
// name: '设备登记',
|
||||
// src: '/static/home_icon/shebeidengji.png'
|
||||
// }
|
||||
]);
|
||||
const ViewDetails = (item) => {
|
||||
uni.navigateTo({
|
||||
@@ -270,15 +299,14 @@
|
||||
const handleMenuClick = (item) => {
|
||||
const menuRoutes = {
|
||||
'成员管理': '/pages/membermanagemen/membermanagemen',
|
||||
'企业信息填报': '/pages/corporateInformation/corporateInformation',
|
||||
'信息填报': '/pages/corporateInformation/corporateInformation',
|
||||
'区域设置':'/pages/area/management',
|
||||
'检查表' :'/pages/checklist/checklist',
|
||||
'检查清单' :'/pages/checklist/checklist',
|
||||
'检查记录': '/pages/Inspectionlog/Inspectionlog',
|
||||
'证照管理': '/pages/Idphotomanagement/Idphotomanagement',
|
||||
'证件管理': '/pages/Idphotomanagement/Idphotomanagement',
|
||||
'隐患排查':'/pages/hiddendanger/Inspection',
|
||||
'隐患销号申请':'/pages/closeout/application',
|
||||
'隐患销号':'/pages/closeout/application',
|
||||
'设备登记':'/pages/equipmentregistration/equipmentregistration',
|
||||
// 可以在这里添加其他菜单的跳转路径
|
||||
};
|
||||
|
||||
const url = menuRoutes[item.name];
|
||||
@@ -336,6 +364,24 @@
|
||||
});
|
||||
const hiddenDangerData = ref([]);
|
||||
|
||||
// 隐患排查 Tab 筛选
|
||||
const dangerTabs = ref(['全部状态', '待验收', '待整改', '待交办', '验收通过']);
|
||||
const activeDangerTab = ref(0);
|
||||
|
||||
// 切换 Tab
|
||||
const switchDangerTab = (index) => {
|
||||
activeDangerTab.value = index;
|
||||
};
|
||||
|
||||
// 根据 Tab 过滤隐患数据
|
||||
const filteredDangerData = computed(() => {
|
||||
if (activeDangerTab.value === 0) {
|
||||
return hiddenDangerData.value;
|
||||
}
|
||||
const status = dangerTabs.value[activeDangerTab.value];
|
||||
return hiddenDangerData.value.filter(item => item.statusName === status);
|
||||
});
|
||||
|
||||
const getHiddenDangerLists = async () => {
|
||||
try {
|
||||
const res = await getHiddenDangerList(hiddenDangerParams.value);
|
||||
@@ -392,13 +438,97 @@
|
||||
url: `/pages/hiddendanger/assignment?hazardId=${item.hazardId}&assignId=${item.assignId}`
|
||||
})
|
||||
}
|
||||
|
||||
// 切换账户
|
||||
const switchAccount = () => {
|
||||
uni.showToast({
|
||||
title: '切换账户功能开发中',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// ========== 顶部背景区域样式 ==========
|
||||
.header-wrapper {
|
||||
position: relative;
|
||||
padding-bottom: 40rpx;
|
||||
overflow: hidden;
|
||||
// 蓝色底色
|
||||
background-color: #2472EA;
|
||||
}
|
||||
|
||||
// 渐变图片叠加在蓝色底色上
|
||||
.header-bg-image {
|
||||
position: absolute;
|
||||
top: 2rpx; // 往下移动
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 0;
|
||||
opacity: 1.6;
|
||||
}
|
||||
|
||||
// 用户信息卡片
|
||||
.user-card {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 42rpx 30rpx 54rpx 30rpx; // 上42 右30 下54 左30
|
||||
|
||||
.user-avatar {
|
||||
flex-shrink: 0;
|
||||
width: 144rpx;
|
||||
height: 144rpx;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
flex: 1;
|
||||
margin-left: 24rpx;
|
||||
overflow: hidden;
|
||||
max-width: 576rpx;
|
||||
|
||||
.user-dept {
|
||||
font-size: 34rpx;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.user-phone {
|
||||
font-size: 26rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.switch-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
padding: 16rpx 24rpx;
|
||||
border-radius: 30rpx;
|
||||
color: #285CE9;
|
||||
font-size: 26rpx;
|
||||
flex-shrink: 0;
|
||||
margin-left: 20rpx;
|
||||
|
||||
text {
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.page-content {
|
||||
background: #EBF2FC;
|
||||
background: #F4F7FB;
|
||||
border-radius: 40rpx 40rpx 0rpx 0rpx;
|
||||
margin-top: -30rpx;
|
||||
margin-top: -40rpx;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 50rpx;
|
||||
position: relative;
|
||||
@@ -406,6 +536,42 @@
|
||||
min-height: calc(100vh - 400rpx);
|
||||
}
|
||||
|
||||
// ========== 功能菜单区域 ==========
|
||||
.menu-card {
|
||||
background: #fff;
|
||||
border-radius: 40rpx 40rpx 0 0rpx;
|
||||
padding: 44rpx 30rpx 30rpx 30rpx;
|
||||
margin-left: -40rpx;
|
||||
margin-right: -40rpx;
|
||||
margin-top: -30rpx;
|
||||
}
|
||||
|
||||
.menu-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
width: 20%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 38rpx;
|
||||
|
||||
.menu-icon {
|
||||
width: 72rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.menu-text {
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
margin-top: 14rpx;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
// 头像图片样式
|
||||
.avatar-image {
|
||||
width: 100%;
|
||||
@@ -413,20 +579,6 @@
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.grid-list {
|
||||
gap: 30rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.list {
|
||||
background: #F2F6FF;
|
||||
box-shadow: 0rpx 4rpx 8rpx 2rpx #CADDFC;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
|
||||
}
|
||||
|
||||
.list-list {
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 2rpx 6rpx 2rpx rgba(0, 0, 0, 0.08);
|
||||
@@ -435,6 +587,67 @@
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
// ========== 检查计划卡片 ==========
|
||||
.plan-card {
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0rpx 2rpx 6rpx 2rpx rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.plan-header {
|
||||
background: linear-gradient(135deg, #4A90E2 0%, #2667E9 100%);
|
||||
padding: 24rpx 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.plan-header-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.plan-header-title {
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.plan-body {
|
||||
padding: 24rpx 30rpx 10rpx 30rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.plan-stats {
|
||||
display: flex;
|
||||
background: #F5F7FA;
|
||||
border-radius: 12rpx;
|
||||
border: 1rpx solid #E8ECF0;
|
||||
overflow: hidden;
|
||||
|
||||
.plan-stat-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
border-right: 1rpx solid #E8ECF0;
|
||||
|
||||
&:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
}
|
||||
|
||||
.plan-stat-num {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.plan-stat-label {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.border-tite {
|
||||
width: 10rpx;
|
||||
height: 32rpx;
|
||||
@@ -499,4 +712,62 @@
|
||||
border: 2rpx solid #FFA39E;
|
||||
color: #F5222D;
|
||||
}
|
||||
|
||||
// ========== 隐患排查 Tab 筛选栏 ==========
|
||||
.danger-tab-scroll {
|
||||
white-space: nowrap;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.danger-tab-list {
|
||||
display: inline-flex;
|
||||
gap: 42rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.danger-tab-item {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
padding-bottom: 12rpx;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.danger-tab-active {
|
||||
font-weight: bold;
|
||||
color: #2667E9 !important;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 40rpx;
|
||||
height: 6rpx;
|
||||
background: #2667E9;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// ========== 隐患卡片 ==========
|
||||
.danger-card {
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx #F1F5FE;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
border: 2rpx solid #EAECEF;
|
||||
}
|
||||
|
||||
.danger-info-row {
|
||||
font-size: 28rpx;
|
||||
margin-top: 16rpx;
|
||||
display: flex;
|
||||
|
||||
.text-gray {
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { baseUrl, getToken } from '@/request/request.js';
|
||||
import { baseUrl, getToken, toImageUrl } from '@/request/request.js';
|
||||
import { getProfileDetail, updateProfile } from '@/request/three_one_api/info.js';
|
||||
|
||||
const saving = ref(false);
|
||||
@@ -85,8 +85,7 @@ const userInfo = reactive({
|
||||
// 获取图片完整URL(用于显示)
|
||||
const getImageUrl = (path) => {
|
||||
if (!path) return '';
|
||||
if (path.startsWith('http')) return path;
|
||||
return baseUrl + path;
|
||||
return toImageUrl(path);
|
||||
};
|
||||
|
||||
// 页面加载时获取个人信息
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import { baseUrl } from '@/request/request.js';
|
||||
import { toImageUrl } from '@/request/request.js';
|
||||
import { getProfileDetail } from '@/request/three_one_api/info.js';
|
||||
|
||||
const defaultAvatar = 'https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg';
|
||||
@@ -108,8 +108,7 @@
|
||||
// 获取图片完整URL(用于显示)
|
||||
const getImageUrl = (path) => {
|
||||
if (!path) return '';
|
||||
if (path.startsWith('http')) return path;
|
||||
return baseUrl + path;
|
||||
return toImageUrl(path);
|
||||
};
|
||||
|
||||
// 获取用户信息
|
||||
|
||||
@@ -352,3 +352,33 @@ export function getInspectionWarningList(params) {
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// AI图片分析接口 - 分析隐患图片
|
||||
export function analyzeHazardImage(params) {
|
||||
return requestAPI({
|
||||
url: '/frontend/ai/analyze-hazard',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
loadingText: 'AI自动识别隐患中'
|
||||
});
|
||||
}
|
||||
|
||||
// AI生成整改方案
|
||||
export function generateRectifyPlan(params) {
|
||||
return requestAPI({
|
||||
url: '/frontend/ai/generate-rectify-plan',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
loadingText: 'AI生成整改方案中'
|
||||
});
|
||||
}
|
||||
|
||||
// AI生成销号方案
|
||||
export function generateWriteoffContent(params) {
|
||||
return requestAPI({
|
||||
url: '/frontend/ai/generate-writeoff-content',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
loadingText: 'AI生成销号方案中'
|
||||
});
|
||||
}
|
||||
@@ -5,6 +5,9 @@ import Request from './luch-request/index.js';
|
||||
const baseUrl = 'https://yingji.hexieapi.com/prod-api';
|
||||
// const baseUrl = 'http://192.168.1.168:5004';
|
||||
|
||||
// 图片/文件资源域名:去掉 /prod-api,便于 <image> / previewImage / downloadFile 直接访问
|
||||
const imageBaseUrl = baseUrl.replace(/\/prod-api\/?$/, '');
|
||||
|
||||
const http = new Request({
|
||||
baseURL: baseUrl,
|
||||
timeout: 10000
|
||||
@@ -45,15 +48,17 @@ function showToast(title) {
|
||||
// 请求
|
||||
const requestAPI = (config) => {
|
||||
// 支持对象参数或传统参数
|
||||
let { url, method = 'GET', data = {}, noAuth = false } = typeof config === 'object' && config.url ? config : { url: config, method: arguments[1] || 'GET', data: arguments[2] || {} };
|
||||
let { url, method = 'GET', data = {}, noAuth = false, loadingText } = typeof config === 'object' && config.url ? config : { url: config, method: arguments[1] || 'GET', data: arguments[2] || {} };
|
||||
|
||||
if (method == 'GET' && !isEmptyObject(data)) {
|
||||
url += '?' + objectToQueryString(data);
|
||||
}
|
||||
// 显示加载状态
|
||||
// 显示加载状态(loadingText 为 false 时不显示)
|
||||
if (loadingText !== false) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
title: loadingText || '加载中...'
|
||||
});
|
||||
}
|
||||
|
||||
// 构建 header,登录等接口不需要 Authorization
|
||||
const header = {
|
||||
@@ -131,3 +136,24 @@ const requestAPI = (config) => {
|
||||
|
||||
// 文件末尾应该导出
|
||||
export { requestAPI, baseUrl, getToken };
|
||||
|
||||
// 把附件 filePath 转成可用于图片预览/下载的 url
|
||||
// filePath 可能是:
|
||||
// 1) 绝对 http(s) 链接
|
||||
// 2) 相对路径(以 / 开头)
|
||||
// 3) 可能带 /prod-api 的拼接结果(兼容处理)
|
||||
export const toImageUrl = (filePath) => {
|
||||
if (!filePath) return '';
|
||||
|
||||
const p = String(filePath);
|
||||
if (p.startsWith('http://') || p.startsWith('https://')) {
|
||||
// 兼容:如果后端返回的是带 /prod-api 的资源地址,直接去掉
|
||||
return p.replace(/\/prod-api(?=\/|$)/, '');
|
||||
}
|
||||
|
||||
// 相对路径:统一拼到 imageBaseUrl 上
|
||||
const normalized = p.startsWith('/') ? p : `/${p}`;
|
||||
return imageBaseUrl + normalized;
|
||||
};
|
||||
|
||||
export { imageBaseUrl };
|
||||
BIN
static/home_icon/chengyuangaunli.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
static/home_icon/jiachaqingdan.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
static/home_icon/jianbianbeijing.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
static/home_icon/jianchajilu.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
static/home_icon/quyushezhi.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
static/home_icon/shebeidengji.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
static/home_icon/wodeyinhuanpaicha.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
static/home_icon/xinxitianbao.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
static/home_icon/yinhuanpaicha.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
static/home_icon/yinhuanxiaohao.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
static/home_icon/zhengjianguanli.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
static/tabbar_icon/address_icon.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
static/tabbar_icon/address_selectedIcon.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
static/tabbar_icon/home_icon.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
static/tabbar_icon/home_selectedIcon.png
Normal file
|
After Width: | Height: | Size: 923 B |
BIN
static/tabbar_icon/mine_icon.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
static/tabbar_icon/mine_selectedIcon.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
static/tabbar_icon/yujing_icon.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
static/tabbar_icon/yujing_selectedIcon.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
1
unpackage/dist/build/mp-weixin/app.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./common/vendor.js"),e=require("./uni_modules/uview-plus/index.js");Math;const n={onLaunch:function(){console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")}};function p(){const p=o.createSSRApp(n);return p.use(e.uviewPlus),{app:p}}p().app.mount("#app"),exports.createApp=p;
|
||||
86
unpackage/dist/build/mp-weixin/app.json
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/map/map",
|
||||
"pages/plandetail/plandetail",
|
||||
"pages/Inspectionresult/Inspectionresult",
|
||||
"pages/membermanagemen/membermanagemen",
|
||||
"pages/corporateInformation/corporateInformation",
|
||||
"pages/editcompanInformation/editcompanInformation",
|
||||
"pages/checklist/checklist",
|
||||
"pages/editchecklist/editchecklist",
|
||||
"pages/Inspectionlog/Inspectionlog",
|
||||
"pages/Inspectionchecklist/Inspectionchecklist",
|
||||
"pages/Idphotomanagement/Idphotomanagement",
|
||||
"pages/hiddendanger/Inspection",
|
||||
"pages/hiddendanger/view",
|
||||
"pages/hiddendanger/rectification",
|
||||
"pages/hiddendanger/acceptance",
|
||||
"pages/hiddendanger/assignment",
|
||||
"pages/closeout/application",
|
||||
"pages/closeout/editor",
|
||||
"pages/equipmentregistration/equipmentregistration",
|
||||
"pages/area/management",
|
||||
"pages/Inspectionwarning/Inspectionwarning",
|
||||
"pages/personalcenter/my",
|
||||
"pages/personalcenter/helpcenter",
|
||||
"pages/personalcenter/notification",
|
||||
"pages/personalcenter/settings",
|
||||
"pages/personalcenter/account",
|
||||
"pages/personalcenter/edit",
|
||||
"pages/login/login",
|
||||
"pages/login/reg",
|
||||
"pages/login/enterprise",
|
||||
"pages/login/success",
|
||||
"pages/login/forget",
|
||||
"pages/login/agreement"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarBackgroundColor": "#007aff",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#999999",
|
||||
"selectedColor": "#007aff",
|
||||
"borderStyle": "black",
|
||||
"backgroundColor": "#ffffff",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "首页",
|
||||
"iconPath": "static/tabbar_icon/home_icon.png",
|
||||
"selectedIconPath": "static/tabbar_icon/home_selectedIcon.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/map/map",
|
||||
"text": "一张图",
|
||||
"iconPath": "static/tabbar_icon/address_icon.png",
|
||||
"selectedIconPath": "static/tabbar_icon/address_selectedIcon.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/Inspectionwarning/Inspectionwarning",
|
||||
"text": "预警",
|
||||
"iconPath": "static/tabbar_icon/yujing_icon.png",
|
||||
"selectedIconPath": "static/tabbar_icon/yujing_selectedIcon.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/personalcenter/my",
|
||||
"text": "我的",
|
||||
"iconPath": "static/tabbar_icon/mine_icon.png",
|
||||
"selectedIconPath": "static/tabbar_icon/mine_selectedIcon.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "你的位置信息将用于选择隐患位置"
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos": [
|
||||
"chooseLocation",
|
||||
"getLocation"
|
||||
],
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
unpackage/dist/build/mp-weixin/app.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/common/assets.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";exports._imports_0="/static/home_icon/jianbianbeijing.png",exports._imports_0$1="/static/yujin/yujin_sousuo.png",exports._imports_0$2="/static/my/Notification.png",exports._imports_0$3="/static/my/Customer service.png",exports._imports_0$4="/static/index/index_bg.png",exports._imports_0$5="/static/index/phone.png",exports._imports_0$6="/static/index/蒙版组 260.png",exports._imports_1="/static/yujin/yujin_tongji.png",exports._imports_1$1="/static/my/Account.png",exports._imports_1$2="/static/my/Phone.png",exports._imports_1$3="/static/index/lock.png";
|
||||
7
unpackage/dist/build/mp-weixin/common/vendor.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/components/AreaFormPopup.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../common/vendor.js"),o={__name:"AreaFormPopup",props:{visible:{type:Boolean,default:!1},isEdit:{type:Boolean,default:!1},editData:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1}},emits:["update:visible","submit","close"],setup(o,{emit:t}){const a=o,i=t,l=e.reactive({name:"",color:"#FF5733"}),c=["#2563eb","#ef4444","#10b981","#f59e0b","#6366f1","#ec4899","#06b6d4","#84cc16","#f97316","#4f46e5","#dc2626","#f59e0b","#d97706","#8b5cf6","#db2777"];e.watch((()=>a.editData),(e=>{e&&Object.keys(e).length>0&&(l.name=e.name||"",l.color=e.color||"#FF5733")}),{immediate:!0,deep:!0}),e.watch((()=>a.visible),(e=>{e||n()}));const n=()=>{l.name="",l.color="#FF5733"},s=()=>{i("update:visible",!1),i("close")},d=()=>{l.name?l.color?i("submit",{name:l.name,color:l.color}):e.index.showToast({title:"请选择区域颜色",icon:"none"}):e.index.showToast({title:"请输入区域名称",icon:"none"})};return(t,a)=>e.e({a:o.visible},o.visible?{b:e.t(o.isEdit?"编辑区域":"新增区域"),c:e.o(s),d:l.name,e:e.o((e=>l.name=e.detail.value)),f:l.color,g:e.o((e=>l.color=e.detail.value)),h:l.color,i:e.f(c,((o,t,a)=>({a:o+t,b:l.color===o?1:"",c:o,d:e.o((e=>(e=>{l.color=e})(o)),o+t)}))),j:e.o(s),k:e.o(d),l:o.loading,m:e.o((()=>{})),n:e.o(s),o:e.gei(t,"")}:{})}},t=e._export_sfc(o,[["__scopeId","data-v-bfbe7800"]]);wx.createComponent(t);
|
||||
4
unpackage/dist/build/mp-weixin/components/AreaFormPopup.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/components/AreaFormPopup.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view wx:if="{{a}}" bindtap="{{n}}" class="{{['popup-mask', 'data-v-bfbe7800', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{o}}"><view class="popup-content data-v-bfbe7800" catchtap="{{m}}"><view class="popup-header data-v-bfbe7800"><view class="popup-title text-bold data-v-bfbe7800">{{b}}</view><view class="popup-close data-v-bfbe7800" bindtap="{{c}}">×</view></view><view class="popup-body data-v-bfbe7800"><view class="flex margin-bottom-sm data-v-bfbe7800"><view class="data-v-bfbe7800">区域名称</view><view class="text-red data-v-bfbe7800">*</view></view><input class="form-input data-v-bfbe7800" placeholder="请输入区域名称" value="{{d}}" bindinput="{{e}}"/><view class="flex margin-bottom-sm margin-top data-v-bfbe7800"><view class="data-v-bfbe7800">区域颜色</view><view class="text-red data-v-bfbe7800">*</view></view><view class="flex align-center data-v-bfbe7800"><input class="color-input flex-sub data-v-bfbe7800" placeholder="#FF5733" value="{{f}}" bindinput="{{g}}"/><view class="color-preview data-v-bfbe7800" style="{{'background-color:' + h}}"></view></view><view class="margin-top margin-bottom-sm text-gray data-v-bfbe7800">预设颜色</view><view class="color-grid data-v-bfbe7800"><view wx:for="{{i}}" wx:for-item="color" wx:key="a" class="{{['color-item', 'data-v-bfbe7800', color.b && 'color-item-active']}}" style="{{'background-color:' + color.c}}" bindtap="{{color.d}}"></view></view></view><view class="popup-footer data-v-bfbe7800"><button class="btn-cancel data-v-bfbe7800" bindtap="{{j}}">取消</button><button class="btn-confirm bg-blue data-v-bfbe7800" bindtap="{{k}}" loading="{{l}}">确定</button></view></view></view>
|
||||
1
unpackage/dist/build/mp-weixin/components/AreaFormPopup.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.popup-mask.data-v-bfbe7800{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:999}.popup-content.data-v-bfbe7800{width:600rpx;background:#fff;border-radius:20rpx;overflow:hidden}.popup-header.data-v-bfbe7800{display:flex;justify-content:space-between;align-items:center;padding:30rpx;border-bottom:1rpx solid #eee}.popup-title.data-v-bfbe7800{font-size:32rpx}.popup-close.data-v-bfbe7800{font-size:40rpx;color:#999}.popup-body.data-v-bfbe7800{padding:30rpx}.popup-footer.data-v-bfbe7800{display:flex;padding:20rpx 30rpx 30rpx}.popup-footer button.data-v-bfbe7800{flex:1;height:80rpx;line-height:80rpx;border-radius:40rpx;font-size:30rpx;margin:0 10rpx}.popup-footer button.data-v-bfbe7800:after{border:none}.popup-footer .btn-cancel.data-v-bfbe7800{background:#f5f5f5;color:#666}.popup-footer .btn-confirm.data-v-bfbe7800{color:#fff}.form-input.data-v-bfbe7800{width:100%;height:70rpx;padding:0 20rpx;border:2rpx solid #dadbde;border-radius:8rpx;font-size:28rpx;box-sizing:border-box}.color-input.data-v-bfbe7800{height:70rpx;padding:0 20rpx;border:2rpx solid #dadbde;border-radius:8rpx;font-size:28rpx;box-sizing:border-box}.color-preview.data-v-bfbe7800{width:70rpx;height:70rpx;border-radius:8rpx;margin-left:20rpx;flex-shrink:0;border:2rpx solid #e5e5e5}.color-grid.data-v-bfbe7800{display:flex;flex-wrap:wrap;gap:16rpx}.color-item.data-v-bfbe7800{width:70rpx;height:70rpx;border-radius:12rpx;border:4rpx solid transparent;box-sizing:border-box}.color-item-active.data-v-bfbe7800{border-color:#333}
|
||||
1
unpackage/dist/build/mp-weixin/pages/Idphotomanagement/Idphotomanagement.js
vendored
Normal file
8
unpackage/dist/build/mp-weixin/pages/Idphotomanagement/Idphotomanagement.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"navigationBarTitleText": "证件照管理",
|
||||
"usingComponents": {
|
||||
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup",
|
||||
"u-datetime-picker": "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker",
|
||||
"u-modal": "../../uni_modules/uview-plus/components/u-modal/u-modal"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/Idphotomanagement/Idphotomanagement.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/Idphotomanagement/Idphotomanagement.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.page.data-v-c2732d0b{min-height:100vh;background:#ebf2fc;padding-bottom:120rpx}.license-list.data-v-c2732d0b{padding-bottom:20rpx}.license-item.data-v-c2732d0b{background:#fff;border-radius:16rpx;padding:24rpx;margin-bottom:20rpx;box-shadow:0 2rpx 12rpx rgba(0,0,0,.05)}.license-header.data-v-c2732d0b{display:flex;justify-content:space-between;align-items:center;margin-bottom:16rpx;padding-bottom:16rpx;border-bottom:1rpx solid #f0f0f0}.license-type.data-v-c2732d0b{font-size:32rpx;font-weight:700;color:#333}.license-actions.data-v-c2732d0b{display:flex;gap:20rpx}.action-btn.data-v-c2732d0b{font-size:28rpx;padding:8rpx 16rpx}.license-detail.data-v-c2732d0b{margin-bottom:16rpx}.detail-row.data-v-c2732d0b{display:flex;margin-bottom:12rpx;font-size:28rpx}.detail-row .label.data-v-c2732d0b{color:#999;width:160rpx;flex-shrink:0}.detail-row .value.data-v-c2732d0b{color:#333;flex:1}.license-photo.data-v-c2732d0b{width:200rpx;height:150rpx;border-radius:8rpx;overflow:hidden}.license-photo image.data-v-c2732d0b{width:100%;height:100%}.empty-state.data-v-c2732d0b{padding:200rpx 0;text-align:center}.add-btn.data-v-c2732d0b{position:fixed;bottom:40rpx;left:30rpx;right:30rpx;height:88rpx;line-height:88rpx;border-radius:44rpx;font-size:32rpx}.popup-content.data-v-c2732d0b{width:600rpx;background:#fff;border-radius:20rpx;padding:30rpx}.popup-header.data-v-c2732d0b{display:flex;justify-content:space-between;align-items:center;margin-bottom:30rpx}.popup-title.data-v-c2732d0b{font-size:34rpx;color:#333}.popup-close.data-v-c2732d0b{font-size:48rpx;color:#999;line-height:1}.popup-body.data-v-c2732d0b{max-height:700rpx;overflow-y:auto}.form-item.data-v-c2732d0b{margin-bottom:24rpx}.form-label.data-v-c2732d0b{font-size:28rpx;color:#333;margin-bottom:12rpx}.form-input.data-v-c2732d0b{width:100%;height:80rpx;border:2rpx solid #E5E5E5;border-radius:12rpx;padding:0 24rpx;font-size:28rpx;box-sizing:border-box}.form-select.data-v-c2732d0b{display:flex;align-items:center;line-height:80rpx}.upload-box.data-v-c2732d0b{width:200rpx;height:200rpx;border:2rpx dashed #ccc;border-radius:12rpx;display:flex;align-items:center;justify-content:center;position:relative}.upload-add.data-v-c2732d0b{display:flex;flex-direction:column;align-items:center}.upload-icon.data-v-c2732d0b{font-size:60rpx;color:#999}.upload-text.data-v-c2732d0b{font-size:24rpx;color:#999;margin-top:8rpx}.upload-preview.data-v-c2732d0b{width:100%;height:100%;position:relative}.upload-img.data-v-c2732d0b{width:100%;height:100%;border-radius:12rpx}.upload-delete.data-v-c2732d0b{position:absolute;top:-16rpx;right:-16rpx;width:40rpx;height:40rpx;background:#ff4d4f;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:28rpx}.popup-footer.data-v-c2732d0b{display:flex;justify-content:center;gap:30rpx;margin-top:40rpx}.btn-cancel.data-v-c2732d0b{flex:1;height:80rpx;line-height:80rpx;border:2rpx solid #E5E5E5;border-radius:40rpx;background:#fff;color:#333;font-size:30rpx}.btn-confirm.data-v-c2732d0b{flex:1;height:80rpx;line-height:80rpx;border-radius:40rpx;color:#fff;font-size:30rpx}.dept-popup.data-v-c2732d0b{width:600rpx;background:#fff;border-radius:20rpx;padding:30rpx}.dept-list.data-v-c2732d0b{max-height:400rpx;overflow-y:auto;margin-bottom:30rpx}.dept-item.data-v-c2732d0b{display:flex;align-items:center;padding:24rpx;border:2rpx solid #E5E5E5;border-radius:12rpx;margin-bottom:16rpx}.dept-checkbox.data-v-c2732d0b{width:36rpx;height:36rpx;border:2rpx solid #ccc;border-radius:6rpx;margin-right:20rpx;display:flex;align-items:center;justify-content:center;flex-shrink:0}.dept-checkbox-active.data-v-c2732d0b{background:#2667e9;border-color:#2667e9;color:#fff}.dept-name.data-v-c2732d0b{font-size:28rpx;color:#333}.btn-dept-confirm.data-v-c2732d0b{width:100%;height:80rpx;line-height:80rpx;border-radius:40rpx;color:#fff;font-size:30rpx}
|
||||
1
unpackage/dist/build/mp-weixin/pages/Inspectionchecklist/Inspectionchecklist.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),r={};const n=e._export_sfc(r,[["render",function(r,n){return{a:e.gei(r,"")}}]]);wx.createPage(n);
|
||||
4
unpackage/dist/build/mp-weixin/pages/Inspectionchecklist/Inspectionchecklist.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "检查清单",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/Inspectionchecklist/Inspectionchecklist.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['padding', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{a}}"><view class="text-bold text-black">检查清单预览</view><view class="flex margin-bottom"><view class="text-gray">计划名称:</view><view>和谐矿业每日巡检</view></view><view class="flex margin-bottom"><view class="text-gray">检查时间:</view><view>2025-11-19 10:18:40</view></view><view class="flex margin-bottom"><view class="text-gray">检查人员:</view><view>18174379303</view></view><image></image><view class="flex margin-bottom"><view>被检查单位:</view><view></view></view><view class="flex margin-bottom"><view>检查人员:</view><view></view></view><view class="flex margin-bottom"><view>上次检查情况:</view><view></view></view><view class="flex margin-bottom"><view>本次检查情况:</view><view></view></view><view class="flex margin-bottom"><view>检查日期:</view><view>2025-11-19 10:18:40</view></view><view class="flex justify-between"><view class="flex text-center align-center"><button class="bg-blue">缩小</button><view>50%</view><button class="bg-blue">放大</button></view><button class="lg cu-btn">重置</button></view></view>
|
||||
0
unpackage/dist/build/mp-weixin/pages/Inspectionchecklist/Inspectionchecklist.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/Inspectionlog/Inspectionlog.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),c={__name:"Inspectionlog",setup:c=>(c,s)=>({a:e.o((c=>{e.index.navigateTo({url:"/pages/Inspectionchecklist/Inspectionchecklist"})})),b:e.gei(c,"")})},s=e._export_sfc(c,[["__scopeId","data-v-fa142cd8"]]);wx.createPage(s);
|
||||
4
unpackage/dist/build/mp-weixin/pages/Inspectionlog/Inspectionlog.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "检查记录",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/Inspectionlog/Inspectionlog.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['page', 'padding', 'data-v-fa142cd8', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{b}}"><view class="padding bg-white radius list data-v-fa142cd8"><view class="text-bold margin-bottom text-black data-v-fa142cd8">和谐矿业每日巡检</view><view class="flex margin-bottom data-v-fa142cd8"><view class="text-gray data-v-fa142cd8">检查时间:</view><view class="data-v-fa142cd8">2025-11-19 10:18:40</view></view><view class="flex margin-bottom data-v-fa142cd8"><view class="text-gray data-v-fa142cd8">检查人员:</view><view class="data-v-fa142cd8">18174379303</view></view><view class="flex margin-bottom data-v-fa142cd8"><view class="text-gray data-v-fa142cd8">隐患数量:</view><view class="data-v-fa142cd8">1</view></view><view class="flex margin-bottom data-v-fa142cd8"><view class="text-gray data-v-fa142cd8">备注:</view><view class="data-v-fa142cd8">可以</view></view><view class="flex justify-between data-v-fa142cd8"><view class="data-v-fa142cd8"></view><button class="bg-blue round cu-btn lg data-v-fa142cd8" bindtap="{{a}}">预览清单</button></view></view></view>
|
||||
1
unpackage/dist/build/mp-weixin/pages/Inspectionlog/Inspectionlog.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.page.data-v-fa142cd8{min-height:100vh;background:#ebf2fc}.list.data-v-fa142cd8{background:#fff;box-shadow:0 2rpx 6rpx 2rpx rgba(0,0,0,.08);border-left:5px solid #2667E9;border-radius:20rpx;padding:20rpx}
|
||||
1
unpackage/dist/build/mp-weixin/pages/Inspectionresult/Inspectionresult.js
vendored
Normal file
12
unpackage/dist/build/mp-weixin/pages/Inspectionresult/Inspectionresult.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"navigationBarTitleText": "检查结果",
|
||||
"usingComponents": {
|
||||
"u-radio": "../../uni_modules/uview-plus/components/u-radio/u-radio",
|
||||
"u-radio-group": "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group",
|
||||
"up-textarea": "../../uni_modules/uview-plus/components/u-textarea/u-textarea",
|
||||
"up-upload": "../../uni_modules/uview-plus/components/u-upload/u-upload",
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-choose": "../../uni_modules/uview-plus/components/u-choose/u-choose",
|
||||
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/Inspectionresult/Inspectionresult.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/Inspectionresult/Inspectionresult.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/Inspectionwarning/Inspectionwarning.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js"),a=require("../../request/api.js");if(!Array){(e.resolveComponent("up-datetime-picker")+e.resolveComponent("up-input"))()}Math||((()=>"../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.js")+(()=>"../../uni_modules/uview-plus/components/u-input/u-input.js"))();const r={__name:"Inspectionwarning",setup(r){const o=e.reactive({startDate:"",endDate:"",deptName:""}),s=e.ref(!1),n=e.ref(!1),u=e.ref(Number(new Date)),d=e.ref(Number(new Date)),i=e.reactive({total:0,overdue:0,completed:0,pending:0}),l=e.ref([]),p=e.ref(1),c=e.ref(20),m=e=>{const t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`},v=e=>{const t=m(e.value);o.startDate=`${t} 00:00:00`,s.value=!1},g=e=>{const t=m(e.value);o.endDate=`${t} 23:59:59`,n.value=!1},D=e=>{if(!e||"按期"===e)return"status-normal";const t=parseInt(e);return t>=7?"status-serious":t>=1?"status-overdue":"status-normal"},f=(e,t)=>{if(!e||"按期"===e)return"已完成"===t?"按期已完成":"期限内待检";const a=parseInt(e);return a>=7?"严重逾期":a>=1?"已完成"===t?"逾期已完成":"逾期未检":"期限内待检"},h=async()=>{try{const e={pageNum:p.value,pageSize:c.value};o.startDate&&(e.startDate=o.startDate),o.endDate&&(e.endDate=o.endDate),o.deptName&&o.deptName.trim()&&(e.deptName=o.deptName.trim());const t=await a.getInspectionWarningList(e);0===t.code&&(t.data.statistics&&(i.total=t.data.statistics.total||0,i.overdue=t.data.statistics.overdue||0,i.completed=t.data.statistics.completed||0,i.pending=t.data.statistics.pending||0),t.data.page&&t.data.page.records&&(l.value=t.data.page.records))}catch(e){console.error("获取预警列表失败:",e)}},N=()=>{p.value=1,h()};return e.onShow((()=>{h()})),(a,r)=>e.e({a:e.f(a.warningList,((t,r,o)=>({a:e.t(t.name),b:a.activeIndex===r?1:"",c:r,d:e.o((e=>a.switchTab(r)),r)}))),b:t._imports_0$1,c:e.t(o.startDate||"请选择"),d:e.n(o.startDate?"date-value":"date-placeholder"),e:e.o((e=>s.value=!0)),f:e.o(v),g:e.o((e=>s.value=!1)),h:e.o((e=>s.value=!1)),i:e.o((e=>u.value=e)),j:e.p({show:s.value,mode:"date",modelValue:u.value}),k:e.t(o.endDate||"请选择"),l:e.n(o.endDate?"date-value":"date-placeholder"),m:e.o((e=>n.value=!0)),n:e.o(g),o:e.o((e=>n.value=!1)),p:e.o((e=>n.value=!1)),q:e.o((e=>d.value=e)),r:e.p({show:n.value,mode:"date",modelValue:d.value}),s:e.o((e=>o.deptName=e)),t:e.p({placeholder:"请输入公司名称",border:"surround",modelValue:o.deptName}),v:e.o(N),w:t._imports_1,x:e.t(i.total),y:e.t(i.overdue),z:e.t(i.completed),A:e.t(i.pending),B:e.f(l.value,((t,a,r)=>({a:e.t(f(t.overdueDays,t.statusName)),b:e.n(D(t.overdueDays)),c:e.t(a+1),d:e.t(t.deptName||"-"),e:e.t(t.planName||"-"),f:e.t(t.cycleName||"-"),g:e.t(t.taskDate||"-"),h:e.t(t.finishTime||"未完成"),i:e.t(t.executorName||"-"),j:e.t(t.overdueDays||"-"),k:t.id}))),C:0===l.value.length},(l.value.length,{}),{D:e.gei(a,"")})}},o=e._export_sfc(r,[["__scopeId","data-v-1f44aadd"]]);wx.createPage(o);
|
||||
7
unpackage/dist/build/mp-weixin/pages/Inspectionwarning/Inspectionwarning.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "日常安全检查预警",
|
||||
"usingComponents": {
|
||||
"up-datetime-picker": "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker",
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/Inspectionwarning/Inspectionwarning.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/Inspectionwarning/Inspectionwarning.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.page.data-v-1f44aadd{min-height:100vh;background:#ebf2fc;padding-bottom:40rpx}.section-header.data-v-1f44aadd{display:flex;align-items:center}.section-header .section-icon.data-v-1f44aadd{width:40rpx;height:40rpx;margin-right:12rpx}.search-card .date-row.data-v-1f44aadd{display:flex;gap:20rpx}.search-card .date-row .date-item.data-v-1f44aadd{flex:1}.search-card .date-label.data-v-1f44aadd{font-size:28rpx;color:#333;margin-bottom:12rpx}.search-card .date-picker.data-v-1f44aadd{display:flex;align-items:center;justify-content:space-between;height:72rpx;padding:0 20rpx;background:#f8f8f8;border-radius:8rpx;border:1rpx solid #eee}.search-card .date-picker .date-value.data-v-1f44aadd{color:#333;font-size:28rpx}.search-card .date-picker .date-placeholder.data-v-1f44aadd{color:#999;font-size:28rpx}.search-card .search-btn.data-v-1f44aadd{margin-top:30rpx;background:linear-gradient(135deg,#667eea,#2667e9);color:#fff;border-radius:40rpx;height:80rpx;line-height:80rpx;font-size:30rpx}.stat-grid.data-v-1f44aadd{display:flex;justify-content:space-between;gap:16rpx}.stat-grid .stat-item.data-v-1f44aadd{flex:1;height:124rpx;border-radius:12rpx;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}.stat-grid .stat-item .stat-num.data-v-1f44aadd{font-size:40rpx;font-weight:700}.stat-grid .stat-item .stat-label.data-v-1f44aadd{font-size:24rpx;margin-top:8rpx}.stat-grid .stat-total.data-v-1f44aadd{background:linear-gradient(135deg,#628efb,#4a7cf7)}.stat-grid .stat-overdue.data-v-1f44aadd{background:linear-gradient(135deg,#32dcc7,#20c5b0)}.stat-grid .stat-completed.data-v-1f44aadd{background:linear-gradient(135deg,#32d1e9,#20b8d0)}.stat-grid .stat-pending.data-v-1f44aadd{background:linear-gradient(135deg,#a190f5,#8b78e8)}.list-title-bar.data-v-1f44aadd{width:8rpx;height:32rpx;background:#2667e9;border-radius:4rpx;margin-right:12rpx}.list-card.data-v-1f44aadd{position:relative;background:#fff;box-shadow:0 2rpx 10rpx rgba(0,0,0,.08);border-left:8rpx solid #2667E9;border-radius:16rpx;padding:30rpx;margin-bottom:20rpx;overflow:hidden}.list-card .card-header.data-v-1f44aadd{margin-bottom:20rpx}.list-card .card-row.data-v-1f44aadd{display:flex;margin-top:16rpx;font-size:28rpx;line-height:1.5}.list-card .card-row .row-label.data-v-1f44aadd{color:#999;white-space:nowrap;flex-shrink:0}.list-card .card-row .row-value.data-v-1f44aadd{color:#333;word-break:break-all}.status-tag.data-v-1f44aadd{position:absolute;top:0;right:0;width:160rpx;height:50rpx;display:flex;align-items:center;justify-content:center;transform:rotate(0);border-radius:0 16rpx}.status-tag .status-text.data-v-1f44aadd{font-size:22rpx;color:#fff;font-weight:500}.status-serious.data-v-1f44aadd{background:linear-gradient(135deg,#ff6b6b,#ee5a5a)}.status-overdue.data-v-1f44aadd{background:linear-gradient(135deg,#ffa726,#ff9800)}.status-normal.data-v-1f44aadd{background:linear-gradient(135deg,#66bb6a,#4caf50)}.status-completed.data-v-1f44aadd{background:linear-gradient(135deg,#42a5f5,#2196f3)}.empty-tip.data-v-1f44aadd{text-align:center;padding:100rpx 0;color:#999;font-size:28rpx}
|
||||
1
unpackage/dist/build/mp-weixin/pages/area/management.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),a=require("../../request/three_one_api/area.js");Math||o();const o=()=>"../../components/AreaFormPopup.js",t={__name:"management",setup(o){const t=e.ref([]),l=e.ref(!1),n=e.ref(!1),c=e.ref(null),r=e.ref(!1),s=e.ref({});e.onMounted((()=>{i()}));const i=async()=>{try{const e=await a.getAreaList();0===e.code&&(t.value=e.data.records||[])}catch(e){console.error("获取区域列表失败:",e)}},u=()=>{n.value=!1,c.value=null,s.value={},l.value=!0},d=()=>{n.value=!1,c.value=null,s.value={}},v=async o=>{r.value=!0;try{const t={name:o.name,color:o.color};let s;n.value?(t.id=c.value,s=await a.updateArea(t)):s=await a.addArea(t),0===s.code&&(l.value=!1,e.index.showToast({title:n.value?"修改成功":"新增成功",icon:"success"}),i())}catch(t){console.error("提交失败:",t),e.index.showToast({title:"操作失败",icon:"none"})}finally{r.value=!1}};return(o,h)=>e.e({a:t.value.length>0},t.value.length>0?{b:e.f(t.value,((o,t,r)=>({a:e.t(o.name||"区域名称"),b:o.color,c:e.t(o.color),d:e.o((t=>(async o=>{try{const e=await a.getAreaDetail({id:o.id});0===e.code&&(n.value=!0,c.value=o.id,s.value={name:e.data.name||"",color:e.data.color||"#FF5733"},l.value=!0)}catch(t){console.error("获取区域详情失败:",t),e.index.showToast({title:"获取详情失败",icon:"none"})}})(o)),o.id),e:e.o((t=>(o=>{e.index.showModal({title:"确认删除",content:"确定要删除该区域吗?",confirmColor:"#e54d42",success:async t=>{if(t.confirm)try{0===(await a.deleteArea({id:o.id})).code&&(e.index.showToast({title:"删除成功",icon:"success"}),i())}catch(l){console.error("删除失败:",l),e.index.showToast({title:"删除失败",icon:"none"})}}})})(o)),o.id),f:o.id})))}:{},{c:e.o(u),d:e.o(v),e:e.o(d),f:e.o((e=>l.value=e)),g:e.p({isEdit:n.value,editData:s.value,loading:r.value,visible:l.value}),h:e.gei(o,"")})}},l=e._export_sfc(t,[["__scopeId","data-v-52477bb6"]]);wx.createPage(l);
|
||||
6
unpackage/dist/build/mp-weixin/pages/area/management.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "区域管理",
|
||||
"usingComponents": {
|
||||
"area-form-popup": "../../components/AreaFormPopup"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/area/management.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['padding', 'page', 'data-v-52477bb6', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{h}}"><view wx:if="{{a}}" class="area-list data-v-52477bb6"><view wx:for="{{b}}" wx:for-item="item" wx:key="f" class="padding bg-white radius margin-bottom data-v-52477bb6"><view class="flex justify-between data-v-52477bb6"><view class="data-v-52477bb6"><view class="text-bold text-black data-v-52477bb6">{{item.a}}</view><view class="margin-top flex align-center data-v-52477bb6"><text class="data-v-52477bb6">颜色:</text><view class="color-dot data-v-52477bb6" style="{{'background-color:' + item.b}}"></view><text class="margin-left-xs data-v-52477bb6">{{item.c}}</text></view></view><view class="data-v-52477bb6"><button class="bg-blue cu-btn data-v-52477bb6" bindtap="{{item.d}}">编辑</button><button class="bg-red cu-btn margin-left data-v-52477bb6" bindtap="{{item.e}}">删除</button></view></view></view></view><view wx:else class="empty-state data-v-52477bb6"><text class="text-gray data-v-52477bb6">暂无区域数据</text></view><button class="add-btn cuIcon-add bg-blue round data-v-52477bb6" bindtap="{{c}}">新增公司区域</button><area-form-popup wx:if="{{g}}" class="data-v-52477bb6" virtualHostClass="data-v-52477bb6" bindsubmit="{{d}}" bindclose="{{e}}" u-i="52477bb6-0" bind:__l="__l" bindupdateVisible="{{f}}" u-p="{{g}}"/></view>
|
||||
1
unpackage/dist/build/mp-weixin/pages/area/management.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.page.data-v-52477bb6{min-height:100vh;background:#ebf2fc;padding-bottom:120rpx}.area-list.data-v-52477bb6{padding-bottom:20rpx}.empty-state.data-v-52477bb6{padding:200rpx 0;text-align:center}.add-btn.data-v-52477bb6{position:fixed;bottom:40rpx;left:30rpx;right:30rpx;height:88rpx;line-height:88rpx;border-radius:44rpx;font-size:32rpx}.color-dot.data-v-52477bb6{width:30rpx;height:30rpx;border-radius:6rpx;flex-shrink:0;margin-left:10rpx}
|
||||
1
unpackage/dist/build/mp-weixin/pages/checklist/checklist.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),t=require("../../request/api.js"),a={__name:"checklist",setup(a){const c=e.ref([]),r=()=>{e.index.navigateTo({url:"/pages/editchecklist/editchecklist"})};return e.onShow((()=>{(async()=>{try{const e=await t.getCheckTableList({pageNum:1,pageSize:100});0===e.code&&(c.value=e.data.records||[])}catch(e){console.error("获取检查表列表失败:",e)}})()})),(t,a)=>e.e({a:e.f(c.value,((t,a,c)=>({a:e.t(t.name),b:t.id}))),b:0===c.value.length},(c.value.length,{}),{c:e.o(r),d:e.gei(t,"")})}},c=e._export_sfc(a,[["__scopeId","data-v-51d49b33"]]);wx.createPage(c);
|
||||
4
unpackage/dist/build/mp-weixin/pages/checklist/checklist.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "检查表",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/checklist/checklist.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['page', 'padding', 'data-v-51d49b33', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{d}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="b" class="checklist-card data-v-51d49b33"><view class="card-name data-v-51d49b33">{{item.a}}</view></view><view wx:if="{{b}}" class="empty-tip data-v-51d49b33"><text class="data-v-51d49b33">暂无检查表</text></view><button class="add-btn data-v-51d49b33" bindtap="{{c}}"><text class="cuIcon-add data-v-51d49b33"></text><text class="data-v-51d49b33">新增检查表</text></button></view>
|
||||
1
unpackage/dist/build/mp-weixin/pages/checklist/checklist.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.page.data-v-51d49b33{min-height:100vh;background:#ebf2fc;padding-bottom:120rpx}.checklist-card.data-v-51d49b33{background:#fff;border-radius:16rpx;padding:30rpx;margin-bottom:20rpx;box-shadow:0 2rpx 10rpx rgba(0,0,0,.05)}.checklist-card .card-name.data-v-51d49b33{font-size:32rpx;color:#333;font-weight:500}.empty-tip.data-v-51d49b33{text-align:center;padding:100rpx 0;color:#999;font-size:28rpx}.add-btn.data-v-51d49b33{position:fixed;bottom:40rpx;left:30rpx;right:30rpx;height:90rpx;background:linear-gradient(135deg,#667eea,#2668ea);border-radius:45rpx;color:#fff;font-size:32rpx;display:flex;align-items:center;justify-content:center;box-shadow:0 8rpx 20rpx rgba(102,126,234,.4)}.add-btn .cuIcon-add.data-v-51d49b33{margin-right:10rpx;font-size:36rpx}
|
||||
1
unpackage/dist/build/mp-weixin/pages/closeout/application.js
vendored
Normal file
10
unpackage/dist/build/mp-weixin/pages/closeout/application.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "销号申请",
|
||||
"usingComponents": {
|
||||
"up-picker": "../../uni_modules/uview-plus/components/u-picker/u-picker",
|
||||
"up-datetime-picker": "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker",
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-textarea": "../../uni_modules/uview-plus/components/u-textarea/u-textarea",
|
||||
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/closeout/application.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['padding', 'page', 'data-v-838320dc', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{R}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="h" class="padding bg-white radius margin-bottom data-v-838320dc"><view class="flex justify-between margin-bottom data-v-838320dc"><view class="text-bold text-black data-v-838320dc">{{item.a}}</view><view class="data-v-838320dc">{{item.b}}</view></view><view class="flex margin-bottom data-v-838320dc"><view class="text-gray data-v-838320dc">隐患日期:</view><view class="text-black data-v-838320dc">{{item.c}}</view></view><view class="flex margin-bottom data-v-838320dc"><view class="text-gray data-v-838320dc">责任单位:</view><view class="text-black data-v-838320dc">{{item.d}}</view></view><view class="flex margin-bottom data-v-838320dc"><view class="text-gray data-v-838320dc">判定人员:</view><view class="text-black data-v-838320dc">{{item.e}}</view></view><view class="flex margin-bottom data-v-838320dc"><view class="text-gray data-v-838320dc">创建时间:</view><view class="text-black data-v-838320dc">{{item.f}}</view></view><view class="flex justify-between data-v-838320dc"><view class="data-v-838320dc"></view><view class="data-v-838320dc"><button class="bg-blue round cu-btn lg data-v-838320dc" bindtap="{{item.g}}">查看详情</button></view></view></view><button class="cuIcon-add bg-blue round margin-top data-v-838320dc" bindtap="{{b}}">新增</button><u-popup wx:if="{{Q}}" class="data-v-838320dc" virtualHostClass="data-v-838320dc" u-s="{{['d']}}" bindclose="{{P}}" u-i="838320dc-0" bind:__l="__l" u-p="{{Q}}"><view class="popup-content data-v-838320dc"><view class="popup-header data-v-838320dc"><view class="popup-title text-bold data-v-838320dc">新增销号申请</view><view class="popup-close data-v-838320dc" bindtap="{{c}}">×</view></view><scroll-view class="popup-body data-v-838320dc" scroll-y style="{{'height:' + '60vh'}}"><view class="flex margin-bottom data-v-838320dc"><view class="data-v-838320dc">隐患</view><view class="text-red data-v-838320dc">*</view></view><view class="picker-input data-v-838320dc" bindtap="{{f}}"><text class="{{['data-v-838320dc', e]}}">{{d}}</text></view><up-picker wx:if="{{j}}" class="data-v-838320dc" virtualHostClass="data-v-838320dc" bindconfirm="{{g}}" bindcancel="{{h}}" bindclose="{{i}}" u-i="838320dc-1,838320dc-0" bind:__l="__l" u-p="{{j}}"></up-picker><view class="flex margin-bottom margin-top data-v-838320dc"><view class="data-v-838320dc">整改时限</view></view><view class="picker-input data-v-838320dc" bindtap="{{m}}"><text class="{{['data-v-838320dc', l]}}">{{k}}</text></view><up-datetime-picker wx:if="{{r}}" class="data-v-838320dc" virtualHostClass="data-v-838320dc" bindconfirm="{{n}}" bindcancel="{{o}}" bindclose="{{p}}" u-i="838320dc-2,838320dc-0" bind:__l="__l" bindupdateModelValue="{{q}}" u-p="{{r}}"></up-datetime-picker><view class="margin-bottom margin-top data-v-838320dc">隐患治理责任单位</view><view class="picker-input data-v-838320dc" bindtap="{{v}}"><text class="{{['data-v-838320dc', t]}}">{{s}}</text></view><up-picker wx:if="{{z}}" class="data-v-838320dc" virtualHostClass="data-v-838320dc" bindconfirm="{{w}}" bindcancel="{{x}}" bindclose="{{y}}" u-i="838320dc-3,838320dc-0" bind:__l="__l" u-p="{{z}}"></up-picker><view class="margin-bottom margin-top data-v-838320dc">主要负责人</view><up-input wx:if="{{B}}" class="data-v-838320dc" virtualHostClass="data-v-838320dc" u-i="838320dc-4,838320dc-0" bind:__l="__l" bindupdateModelValue="{{A}}" u-p="{{B}}"></up-input><view class="ai-btn-wrapper margin-top margin-bottom data-v-838320dc"><button class="ai-analyze-btn data-v-838320dc" loading="{{E}}" disabled="{{F}}" bindtap="{{G}}"><text wx:if="{{C}}" class="cuIcon-magic ai-btn-icon data-v-838320dc"></text> {{D}}</button></view><view class="margin-bottom margin-top data-v-838320dc">主要治理内容</view><up-textarea wx:if="{{I}}" class="data-v-838320dc" virtualHostClass="data-v-838320dc" u-i="838320dc-5,838320dc-0" bind:__l="__l" bindupdateModelValue="{{H}}" u-p="{{I}}"></up-textarea><view class="margin-bottom margin-top data-v-838320dc">隐患治理完成内容</view><up-textarea wx:if="{{K}}" class="data-v-838320dc" virtualHostClass="data-v-838320dc" u-i="838320dc-6,838320dc-0" bind:__l="__l" bindupdateModelValue="{{J}}" u-p="{{K}}"></up-textarea><view class="margin-bottom margin-top data-v-838320dc">隐患治理责任单位自行验收的情况</view><up-textarea wx:if="{{M}}" class="data-v-838320dc" virtualHostClass="data-v-838320dc" u-i="838320dc-7,838320dc-0" bind:__l="__l" bindupdateModelValue="{{L}}" u-p="{{M}}"></up-textarea></scroll-view><view class="popup-footer data-v-838320dc"><button class="btn-cancel data-v-838320dc" bindtap="{{N}}">取消</button><button class="btn-confirm bg-blue data-v-838320dc" bindtap="{{O}}">确定</button></view></view></u-popup></view>
|
||||
1
unpackage/dist/build/mp-weixin/pages/closeout/application.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.page.data-v-838320dc{min-height:100vh;background:#ebf2fc}.popup-content.data-v-838320dc{width:600rpx;background:#fff;border-radius:20rpx;overflow:hidden}.popup-header.data-v-838320dc{display:flex;justify-content:space-between;align-items:center;padding:30rpx;border-bottom:1rpx solid #eee}.popup-header .popup-title.data-v-838320dc{font-size:32rpx;color:#333}.popup-header .popup-close.data-v-838320dc{font-size:40rpx;color:#999;line-height:1}.popup-body.data-v-838320dc{padding:30rpx}.popup-footer.data-v-838320dc{display:flex;border-top:1rpx solid #eee}.popup-footer button.data-v-838320dc{flex:1;height:90rpx;line-height:90rpx;border-radius:0;font-size:30rpx}.popup-footer button.data-v-838320dc:after{border:none}.popup-footer .btn-cancel.data-v-838320dc{background:#fff;color:#666}.popup-footer .btn-confirm.data-v-838320dc{color:#fff}.ai-btn-wrapper.data-v-838320dc{display:flex;justify-content:flex-end}.ai-analyze-btn.data-v-838320dc{display:flex;align-items:center;justify-content:center;height:72rpx;padding:0 32rpx;font-size:28rpx;color:#fff;background:linear-gradient(135deg,#4facfe,#2668ea);border-radius:36rpx;border:none}.ai-analyze-btn.data-v-838320dc:after{border:none}.ai-analyze-btn .ai-btn-icon.data-v-838320dc{margin-right:8rpx;font-size:30rpx}.ai-analyze-btn[disabled].data-v-838320dc{opacity:.7}.picker-input.data-v-838320dc{background:#fff;border-radius:8rpx;padding:24rpx 20rpx;margin-bottom:20rpx;border:1rpx solid #eee}.picker-input text.data-v-838320dc{font-size:28rpx}
|
||||
1
unpackage/dist/build/mp-weixin/pages/closeout/editor.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),a=require("../../request/api.js");if(!Array){e.resolveComponent("up-input")()}Math;const o={__name:"editor",setup(o){const l=e.ref(""),t=e.ref(!1),s=e.reactive({id:"",hazardId:"",hazardTitle:"",hazardCreatedAt:"",responsibleDeptName:"",responsiblePerson:"",createdAt:"",statusName:""}),d=async e=>{console.log("=== fetchDetail 被调用 ===, id:",e);try{const o=await a.getMyWriteOffList();if(console.log("接口返回:",o),0===o.code&&o.data&&o.data.length>0){const a=o.data;let l=null;e&&(l=a.find((a=>a.id==e))),l||(l=a[0]),console.log("绑定数据:",l),s.id=l.id,s.hazardId=l.hazardId,s.hazardTitle=l.hazardTitle||"",s.hazardCreatedAt=l.hazardCreatedAt||"",s.responsibleDeptName=l.responsibleDeptName||"",s.responsiblePerson=l.responsiblePerson||"",s.createdAt=l.createdAt||"",s.statusName=l.statusName||"",1==l.status||"待审核"===l.statusName?(t.value=!0,console.log("状态为待审核,可以编辑")):(t.value=!1,console.log("状态为已审核,不可编辑"))}}catch(o){console.error("获取详情失败:",o)}},r=()=>{e.index.navigateBack()};return e.onLoad((e=>{console.log("=== onLoad 触发 ==="),console.log("options:",e),l.value=(null==e?void 0:e.id)||"",d(l.value)})),e.onMounted((()=>{if(console.log("=== onMounted 触发 ==="),!l.value){const e=(()=>{const e=getCurrentPages(),a=e[e.length-1];return(null==a?void 0:a.options)||{}})();console.log("备用获取参数:",e),l.value=(null==e?void 0:e.id)||"",d(l.value)}})),(a,o)=>({a:e.o((e=>s.hazardTitle=e)),b:e.p({placeholder:"",disabled:!0,modelValue:s.hazardTitle}),c:e.o((e=>s.hazardCreatedAt=e)),d:e.p({placeholder:"",disabled:!0,modelValue:s.hazardCreatedAt}),e:e.o((e=>s.responsibleDeptName=e)),f:e.p({placeholder:"请输入",disabled:!t.value,modelValue:s.responsibleDeptName}),g:e.o((e=>s.responsiblePerson=e)),h:e.p({placeholder:"请输入",disabled:!t.value,modelValue:s.responsiblePerson}),i:e.o((e=>s.createdAt=e)),j:e.p({placeholder:"",disabled:!0,modelValue:s.createdAt}),k:e.o((e=>s.statusName=e)),l:e.p({placeholder:"",disabled:!0,modelValue:s.statusName}),m:e.o(r),n:e.gei(a,"")})}},l=e._export_sfc(o,[["__scopeId","data-v-c2c78ce5"]]);wx.createPage(l);
|
||||
6
unpackage/dist/build/mp-weixin/pages/closeout/editor.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "销号详情",
|
||||
"usingComponents": {
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/closeout/editor.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['padding', 'page', 'data-v-c2c78ce5', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{n}}"><view class="padding bg-white radius data-v-c2c78ce5"><view class="flex margin-bottom data-v-c2c78ce5"><view class="text-gray data-v-c2c78ce5">隐患</view></view><up-input wx:if="{{b}}" class="data-v-c2c78ce5" virtualHostClass="data-v-c2c78ce5" u-i="c2c78ce5-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"></up-input><view class="text-gray margin-bottom margin-top data-v-c2c78ce5">隐患日期</view><up-input wx:if="{{d}}" class="data-v-c2c78ce5" virtualHostClass="data-v-c2c78ce5" u-i="c2c78ce5-1" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"></up-input><view class="text-gray margin-bottom margin-top data-v-c2c78ce5">隐患治理责任单位</view><up-input wx:if="{{f}}" class="data-v-c2c78ce5" virtualHostClass="data-v-c2c78ce5" u-i="c2c78ce5-2" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"></up-input><view class="text-gray margin-bottom margin-top data-v-c2c78ce5">主要负责人</view><up-input wx:if="{{h}}" class="data-v-c2c78ce5" virtualHostClass="data-v-c2c78ce5" u-i="c2c78ce5-3" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></up-input><view class="text-gray margin-bottom margin-top data-v-c2c78ce5">创建时间</view><up-input wx:if="{{j}}" class="data-v-c2c78ce5" virtualHostClass="data-v-c2c78ce5" u-i="c2c78ce5-4" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"></up-input><view class="text-gray margin-bottom margin-top data-v-c2c78ce5">状态</view><up-input wx:if="{{l}}" class="data-v-c2c78ce5" virtualHostClass="data-v-c2c78ce5" u-i="c2c78ce5-5" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"></up-input><view class="flex justify-center margin-top-xl data-v-c2c78ce5" style="gap:30rpx"><button class="round cu-btn lg data-v-c2c78ce5" bindtap="{{m}}">返回</button></view></view></view>
|
||||
1
unpackage/dist/build/mp-weixin/pages/closeout/editor.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.page.data-v-c2c78ce5{min-height:100vh;background:#ebf2fc}
|
||||
1
unpackage/dist/build/mp-weixin/pages/corporateInformation/corporateInformation.js
vendored
Normal file
9
unpackage/dist/build/mp-weixin/pages/corporateInformation/corporateInformation.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "企业信息",
|
||||
"usingComponents": {
|
||||
"up-upload": "../../uni_modules/uview-plus/components/u-upload/u-upload",
|
||||
"up-modal": "../../uni_modules/uview-plus/components/u-modal/u-modal",
|
||||
"u-datetime-picker": "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker",
|
||||
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/corporateInformation/corporateInformation.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/corporateInformation/corporateInformation.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.page.data-v-27b55b80{min-height:100vh;background:#ebf2fc}.list.data-v-27b55b80{background:#fff;box-shadow:0 2rpx 6rpx 2rpx rgba(0,0,0,.08);border-left:5px solid #2667E9;border-radius:20rpx;padding:20rpx}.info-item.data-v-27b55b80{display:flex;margin-top:16rpx;font-size:28rpx}.info-item .text-gray.data-v-27b55b80{flex-shrink:0;color:#999}.empty-box.data-v-27b55b80{padding:100rpx 40rpx;text-align:center}.modal-scroll-body.data-v-27b55b80{height:60vh;padding:20rpx 0;box-sizing:border-box}.form-input.data-v-27b55b80{width:100%;height:80rpx;padding:0 24rpx;border:1rpx solid #dcdfe6;border-radius:8rpx;font-size:28rpx;box-sizing:border-box;background:#fff}.form-textarea.data-v-27b55b80{width:100%;min-height:160rpx;padding:20rpx 24rpx;border:1rpx solid #dcdfe6;border-radius:8rpx;font-size:28rpx;box-sizing:border-box;background:#fff}.form-label.data-v-27b55b80{display:flex;align-items:center;margin-bottom:12rpx}.form-label .text-red.data-v-27b55b80{margin-left:4rpx}.select-trigger.data-v-27b55b80{display:flex;align-items:center;justify-content:space-between;background:#fff;border:1rpx solid #dcdfe6;border-radius:8rpx;padding:20rpx 24rpx}.select-trigger .select-value.data-v-27b55b80{flex:1;font-size:28rpx;color:#333}.select-trigger .select-value.placeholder.data-v-27b55b80{color:#c0c4cc}.picker-popup.data-v-27b55b80{background:#fff}.picker-popup .picker-header.data-v-27b55b80{display:flex;justify-content:space-between;align-items:center;padding:30rpx;border-bottom:1rpx solid #eee}.picker-popup .picker-header .picker-cancel.data-v-27b55b80{font-size:28rpx;color:#999}.picker-popup .picker-header .picker-title.data-v-27b55b80{font-size:32rpx;font-weight:700;color:#333}.picker-popup .picker-header .picker-confirm.data-v-27b55b80{font-size:28rpx;color:#2667e9}.picker-popup .picker-body.data-v-27b55b80{max-height:600rpx;padding:0 30rpx}.picker-popup .picker-item.data-v-27b55b80{display:flex;justify-content:space-between;align-items:center;padding:30rpx 0;border-bottom:1rpx solid #f5f5f5;font-size:30rpx;color:#333}.picker-popup .picker-item.data-v-27b55b80:last-child{border-bottom:none}.picker-popup .picker-item.active.data-v-27b55b80{color:#2667e9}
|
||||
1
unpackage/dist/build/mp-weixin/pages/editchecklist/editchecklist.js
vendored
Normal file
10
unpackage/dist/build/mp-weixin/pages/editchecklist/editchecklist.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "编辑检查表",
|
||||
"usingComponents": {
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-picker": "../../uni_modules/uview-plus/components/u-picker/u-picker",
|
||||
"up-textarea": "../../uni_modules/uview-plus/components/u-textarea/u-textarea",
|
||||
"up-datetime-picker": "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker",
|
||||
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/editchecklist/editchecklist.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/editchecklist/editchecklist.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/editcompanInformation/editcompanInformation.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js");if(!Array){(e.resolveComponent("up-input")+e.resolveComponent("up-radio")+e.resolveComponent("up-radio-group")+e.resolveComponent("up-upload")+e.resolveComponent("up-textarea"))()}Math||((()=>"../../uni_modules/uview-plus/components/u-input/u-input.js")+(()=>"../../uni_modules/uview-plus/components/u-radio/u-radio.js")+(()=>"../../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js")+(()=>"../../uni_modules/uview-plus/components/u-upload/u-upload.js")+(()=>"../../uni_modules/uview-plus/components/u-textarea/u-textarea.js"))();const o={__name:"editcompanInformation",setup(o){const l=e.reactive([{name:"矿山开采",disabled:!1},{name:"化工生产",disabled:!1},{name:"冶金工业",disabled:!1},{name:"建筑施工",disabled:!1}]),a=e.ref("矿山开采"),u=e=>{console.log("groupChange",e)},r=e=>{console.log("radioChange",e)},d=e.ref([]),n=e=>{console.log(e)},p=e=>{console.log(e)};return(o,s)=>({a:e.o(o.change),b:e.o((e=>o.value=e)),c:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),d:e.o(o.change),e:e.o((e=>o.value=e)),f:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),g:e.o(o.change),h:e.o((e=>o.value=e)),i:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),j:e.o(o.change),k:e.o((e=>o.value=e)),l:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),m:e.o(o.change),n:e.o((e=>o.value=e)),o:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),p:e.o(o.change),q:e.o((e=>o.value=e)),r:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),s:e.f(l,((o,l,a)=>({a:l,b:e.o(r,l),c:"00cf593d-7-"+a+",00cf593d-6",d:e.p({customStyle:{marginBottom:"8px"},label:o.name,name:o.name})}))),t:e.o(u),v:e.o((e=>a.value=e)),w:e.p({placement:"row",shape:"square",modelValue:a.value}),x:e.o(o.change),y:e.o((e=>o.value=e)),z:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),A:e.o(o.change),B:e.o((e=>o.value=e)),C:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),D:e.o(o.change),E:e.o((e=>o.value=e)),F:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),G:e.o(o.change),H:e.o((e=>o.value=e)),I:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),J:e.o(o.change),K:e.o((e=>o.value=e)),L:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),M:e.o(o.change),N:e.o((e=>o.value=e)),O:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),P:e.o(o.change),Q:e.o((e=>o.value=e)),R:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),S:e.o(o.change),T:e.o((e=>o.value=e)),U:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),V:e.o(o.change),W:e.o((e=>o.value=e)),X:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),Y:e.o(o.change),Z:e.o((e=>o.value=e)),aa:e.p({placeholder:"请输入内容",border:"surround",modelValue:o.value}),ab:e.o(n),ac:e.o(p),ad:e.p({fileList:d.value,name:"1",multiple:!0,maxCount:10}),ae:e.o((e=>o.value1=e)),af:e.p({placeholder:"请输入内容",modelValue:o.value1}),ag:e.gei(o,"")})}},l=e._export_sfc(o,[["__scopeId","data-v-00cf593d"]]);wx.createPage(l);
|
||||
10
unpackage/dist/build/mp-weixin/pages/editcompanInformation/editcompanInformation.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "编辑企业信息",
|
||||
"usingComponents": {
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-radio": "../../uni_modules/uview-plus/components/u-radio/u-radio",
|
||||
"up-radio-group": "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group",
|
||||
"up-upload": "../../uni_modules/uview-plus/components/u-upload/u-upload",
|
||||
"up-textarea": "../../uni_modules/uview-plus/components/u-textarea/u-textarea"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/editcompanInformation/editcompanInformation.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/editcompanInformation/editcompanInformation.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.page.data-v-00cf593d{min-height:100vh;background:#ebf2fc}
|
||||
1
unpackage/dist/build/mp-weixin/pages/equipmentregistration/equipmentregistration.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js");if(!Array){(e.resolveComponent("up-input")+e.resolveComponent("up-datetime-picker")+e.resolveComponent("up-textarea")+e.resolveComponent("u-popup"))()}Math||((()=>"../../uni_modules/uview-plus/components/u-input/u-input.js")+(()=>"../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.js")+(()=>"../../uni_modules/uview-plus/components/u-textarea/u-textarea.js")+(()=>"../../uni_modules/uview-plus/components/u-popup/u-popup.js"))();const o={__name:"equipmentregistration",setup(o){const u=e.ref(!1),a=e.ref([]),l=()=>{u.value=!0},t=()=>{e.index.chooseMessageFile({count:10,type:"all",success:e=>{const o=e.tempFiles.map((e=>({name:e.name,path:e.path,size:e.size})));a.value=[...a.value,...o]},fail:()=>{e.index.chooseImage({count:9,success:e=>{const o=e.tempFilePaths.map(((e,o)=>({name:`文件${a.value.length+o+1}`,path:e,size:0})));a.value=[...a.value,...o]}})}})},p=()=>{u.value=!1,e.index.showToast({title:"新增成功",icon:"success"})},s=e.ref(!1),n=e.ref(Date.now());return(o,c)=>e.e({a:e.o(l),b:e.o((e=>u.value=!1)),c:e.p({placeholder:"请输入型号"}),d:e.p({placeholder:"请输入名称"}),e:e.p({placeholder:"请输入参数"}),f:e.p({placeholder:"请输入数量"}),g:e.o((e=>n.value=e)),h:e.p({hasInput:!0,show:s.value,mode:"date",modelValue:n.value}),i:e.o((e=>n.value=e)),j:e.p({hasInput:!0,show:s.value,mode:"date",modelValue:n.value}),k:e.p({placeholder:"请输入区域"}),l:e.o(t),m:a.value.length>0},a.value.length>0?{n:e.f(a.value,((o,u,l)=>({a:e.t(o.name),b:e.o((e=>(e=>{a.value.splice(e,1)})(u)),u),c:u})))}:{},{o:e.o((e=>n.value=e)),p:e.p({placeholder:"请输入备注",modelValue:n.value}),q:e.o((e=>u.value=!1)),r:e.o(p),s:e.o((e=>u.value=!1)),t:e.p({show:u.value,mode:"center",round:"20"}),v:e.gei(o,"")})}},u=e._export_sfc(o,[["__scopeId","data-v-66a12537"]]);wx.createPage(u);
|
||||
9
unpackage/dist/build/mp-weixin/pages/equipmentregistration/equipmentregistration.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "设备登记",
|
||||
"usingComponents": {
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-datetime-picker": "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker",
|
||||
"up-textarea": "../../uni_modules/uview-plus/components/u-textarea/u-textarea",
|
||||
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/equipmentregistration/equipmentregistration.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['padding', 'data-v-66a12537', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{v}}"><view class="padding data-v-66a12537"><view class="text-gray text-center margin-top-xl margin-bottom-xl data-v-66a12537">暂无设备</view><button class="cuIcon-add round bg-blue data-v-66a12537" bindtap="{{a}}">新增</button></view><u-popup wx:if="{{t}}" class="data-v-66a12537" virtualHostClass="data-v-66a12537" u-s="{{['d']}}" bindclose="{{s}}" u-i="66a12537-0" bind:__l="__l" u-p="{{t}}"><view class="popup-content data-v-66a12537"><view class="popup-header data-v-66a12537"><view class="popup-title text-bold data-v-66a12537">新增设备</view><view class="popup-close data-v-66a12537" bindtap="{{b}}">×</view></view><scroll-view class="popup-body data-v-66a12537" scroll-y style="{{'height:' + '60vh'}}"><view class="flex data-v-66a12537"><view class="margin-bottom data-v-66a12537">型号</view><view class="text-red data-v-66a12537">*</view></view><up-input wx:if="{{c}}" class="data-v-66a12537" virtualHostClass="data-v-66a12537" u-i="66a12537-1,66a12537-0" bind:__l="__l" u-p="{{c}}"></up-input><view class="flex margin-bottom margin-top data-v-66a12537"><view class="data-v-66a12537">名称</view><view class="text-red data-v-66a12537">*</view></view><up-input wx:if="{{d}}" class="data-v-66a12537" virtualHostClass="data-v-66a12537" u-i="66a12537-2,66a12537-0" bind:__l="__l" u-p="{{d}}"></up-input><view class="margin-bottom margin-top data-v-66a12537">参数</view><up-input wx:if="{{e}}" class="data-v-66a12537" virtualHostClass="data-v-66a12537" u-i="66a12537-3,66a12537-0" bind:__l="__l" u-p="{{e}}"></up-input><view class="flex margin-bottom margin-top data-v-66a12537"><view class="data-v-66a12537">数量(单位:台)</view><view class="text-red data-v-66a12537">*</view></view><up-input wx:if="{{f}}" class="data-v-66a12537" virtualHostClass="data-v-66a12537" u-i="66a12537-4,66a12537-0" bind:__l="__l" u-p="{{f}}"></up-input><view class="flex margin-bottom margin-top data-v-66a12537"><view class="data-v-66a12537">购买时间</view><view class="text-red data-v-66a12537">*</view></view><up-datetime-picker wx:if="{{h}}" class="data-v-66a12537" virtualHostClass="data-v-66a12537" u-i="66a12537-5,66a12537-0" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></up-datetime-picker><view class="flex margin-bottom margin-top data-v-66a12537"><view class="data-v-66a12537">设备预警时间</view><view class="text-red data-v-66a12537">*</view></view><up-datetime-picker wx:if="{{j}}" class="data-v-66a12537" virtualHostClass="data-v-66a12537" u-i="66a12537-6,66a12537-0" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"></up-datetime-picker><view class="flex margin-bottom margin-top data-v-66a12537"><view class="data-v-66a12537">区域</view><view class="text-red data-v-66a12537">*</view></view><up-input wx:if="{{k}}" class="data-v-66a12537" virtualHostClass="data-v-66a12537" u-i="66a12537-7,66a12537-0" bind:__l="__l" u-p="{{k}}"></up-input><view class="margin-top-sm margin-bottom-sm margin-bottom margin-top data-v-66a12537">上传资料</view><view class="upload-area data-v-66a12537" bindtap="{{l}}"><view class="upload-icon data-v-66a12537"><text class="cuIcon-upload data-v-66a12537" style="font-size:60rpx;color:#999"></text></view><view class="upload-text data-v-66a12537">点击选择文件</view><view class="upload-tip data-v-66a12537">支持Word、Excel、PDF、图片等格式</view><button class="cu-but bg-blue data-v-66a12537">选择文件</button></view><view wx:if="{{m}}" class="file-list data-v-66a12537"><view wx:for="{{n}}" wx:for-item="file" wx:key="c" class="file-item data-v-66a12537"><text class="file-name data-v-66a12537">{{file.a}}</text><text class="file-delete text-red data-v-66a12537" catchtap="{{file.b}}">×</text></view></view><view class="margin-top-sm margin-bottom margin-top data-v-66a12537">备注</view><up-textarea wx:if="{{p}}" class="data-v-66a12537" virtualHostClass="data-v-66a12537" u-i="66a12537-8,66a12537-0" bind:__l="__l" bindupdateModelValue="{{o}}" u-p="{{p}}"></up-textarea></scroll-view><view class="popup-footer data-v-66a12537"><button class="btn-cancel data-v-66a12537" bindtap="{{q}}">取消</button><button class="btn-confirm bg-blue data-v-66a12537" bindtap="{{r}}">确定</button></view></view></u-popup></view>
|
||||
1
unpackage/dist/build/mp-weixin/pages/equipmentregistration/equipmentregistration.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.popup-content.data-v-66a12537{width:600rpx;background:#fff;border-radius:20rpx;overflow:hidden}.popup-header.data-v-66a12537{display:flex;justify-content:space-between;align-items:center;padding:30rpx;border-bottom:1rpx solid #eee}.popup-title.data-v-66a12537{font-size:32rpx}.popup-close.data-v-66a12537{font-size:40rpx;color:#999;cursor:pointer}.popup-body.data-v-66a12537{padding:30rpx}.popup-footer.data-v-66a12537{display:flex;border-top:1rpx solid #eee}.popup-footer button.data-v-66a12537{flex:1;height:90rpx;line-height:90rpx;border-radius:0;font-size:30rpx}.popup-footer button.data-v-66a12537:after{border:none}.popup-footer .btn-cancel.data-v-66a12537{background:#f5f5f5;color:#666}.popup-footer .btn-confirm.data-v-66a12537{color:#fff}.upload-area.data-v-66a12537{background:#F8F8F;border:2rpx dashed #C5D4F5;border-radius:16rpx;padding:40rpx 30rpx;display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:16rpx}.upload-icon.data-v-66a12537{width:80rpx;height:80rpx;display:flex;align-items:center;justify-content:center;margin-bottom:16rpx}.upload-text.data-v-66a12537{font-size:28rpx;color:#333;margin-bottom:8rpx}.upload-tip.data-v-66a12537{font-size:24rpx;color:#999;margin-bottom:24rpx}.upload-btn.data-v-66a12537{padding:16rpx 48rpx;font-size:28rpx;color:#fff;border-radius:40rpx}.file-list.data-v-66a12537{margin-top:20rpx}.file-item.data-v-66a12537{display:flex;justify-content:space-between;align-items:center;padding:16rpx 20rpx;background:#f5f5f5;border-radius:8rpx;margin-bottom:12rpx}.file-name.data-v-66a12537{font-size:26rpx;color:#333;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-delete.data-v-66a12537{font-size:36rpx;padding-left:20rpx}
|
||||
1
unpackage/dist/build/mp-weixin/pages/hiddendanger/Inspection.js
vendored
Normal file
10
unpackage/dist/build/mp-weixin/pages/hiddendanger/Inspection.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "隐患排查",
|
||||
"usingComponents": {
|
||||
"up-upload": "../../uni_modules/uview-plus/components/u-upload/u-upload",
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-choose": "../../uni_modules/uview-plus/components/u-choose/u-choose",
|
||||
"up-textarea": "../../uni_modules/uview-plus/components/u-textarea/u-textarea",
|
||||
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/hiddendanger/Inspection.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/hiddendanger/Inspection.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.page.data-v-5561d26d{min-height:100vh;background:#ebf2fc;padding-bottom:120rpx}.fixed-add-btn.data-v-5561d26d{position:fixed;bottom:40rpx;left:30rpx;right:30rpx;height:88rpx;background:linear-gradient(135deg,#667eea,#2668ea);border-radius:44rpx;display:flex;align-items:center;justify-content:center;color:#fff;font-size:32rpx;font-weight:500;box-shadow:0 8rpx 24rpx rgba(38,104,234,.4);z-index:100}.fixed-add-btn .cuIcon-add.data-v-5561d26d{margin-right:10rpx;font-size:36rpx}.list-list.data-v-5561d26d{background:#fff;box-shadow:0 2rpx 6rpx 2rpx rgba(0,0,0,.08);border-left:5px solid #2667E9;border-radius:20rpx;padding:20rpx}.level-tag.data-v-5561d26d{padding:4rpx 16rpx;border-radius:8rpx}.level-minor.data-v-5561d26d{background:#f6ffed;border:2rpx solid #B7EB8F;color:#52c41a}.level-normal.data-v-5561d26d{background:#fff7e6;border:2rpx solid #FFD591;color:#fa8c16}.level-major.data-v-5561d26d{background:#fff1f0;border:2rpx solid #FFA39E;color:#f5222d}.ai-btn-wrapper.data-v-5561d26d{display:flex;justify-content:flex-end}.ai-analyze-btn.data-v-5561d26d{display:flex;align-items:center;justify-content:center;height:72rpx;padding:0 32rpx;font-size:28rpx;color:#fff;background:linear-gradient(135deg,#4facfe,#2668ea);border-radius:36rpx;border:none}.ai-analyze-btn.data-v-5561d26d:after{border:none}.ai-analyze-btn .ai-btn-icon.data-v-5561d26d{margin-right:8rpx;font-size:30rpx}.ai-analyze-btn[disabled].data-v-5561d26d{opacity:.7}.popup-content.data-v-5561d26d{width:600rpx;background:#fff;border-radius:20rpx;overflow:hidden}.popup-header.data-v-5561d26d{display:flex;justify-content:space-between;align-items:center;padding:30rpx;border-bottom:1rpx solid #eee}.popup-header .popup-title.data-v-5561d26d{font-size:32rpx;color:#333}.popup-header .popup-close.data-v-5561d26d{font-size:40rpx;color:#999;line-height:1}.popup-body.data-v-5561d26d{padding:30rpx;max-height:900rpx;overflow-y:auto}.popup-footer.data-v-5561d26d{display:flex;border-top:1rpx solid #eee}.popup-footer button.data-v-5561d26d{flex:1;height:90rpx;line-height:90rpx;border-radius:0;font-size:30rpx}.popup-footer button.data-v-5561d26d:after{border:none}.popup-footer .btn-cancel.data-v-5561d26d{background:#fff;color:#666}.popup-footer .btn-confirm.data-v-5561d26d{color:#fff}.address-box.data-v-5561d26d{display:flex;align-items:center;gap:20rpx}.address-box .address-input-wrapper.data-v-5561d26d{flex:1}.address-box .btn-address.data-v-5561d26d{flex-shrink:0;height:70rpx;line-height:70rpx;padding:0 30rpx;font-size:26rpx;border-radius:8rpx;color:#fff}.address-box .btn-address.data-v-5561d26d:after{border:none}.select-trigger.data-v-5561d26d{display:flex;align-items:center;justify-content:space-between;background:#fff;border:1rpx solid #dcdfe6;border-radius:8rpx;padding:20rpx 24rpx}.select-trigger .select-value.data-v-5561d26d{flex:1;font-size:28rpx;color:#333}.select-trigger .select-value.placeholder.data-v-5561d26d{color:#c0c4cc}.picker-popup.data-v-5561d26d{background:#fff}.picker-popup .picker-header.data-v-5561d26d{display:flex;justify-content:space-between;align-items:center;padding:30rpx;border-bottom:1rpx solid #eee}.picker-popup .picker-header .picker-cancel.data-v-5561d26d{font-size:28rpx;color:#999}.picker-popup .picker-header .picker-title.data-v-5561d26d{font-size:32rpx;font-weight:700;color:#333}.picker-popup .picker-header .picker-confirm.data-v-5561d26d{font-size:28rpx;color:#2667e9}.picker-popup .picker-body.data-v-5561d26d{max-height:600rpx;padding:0 30rpx}.picker-popup .picker-item.data-v-5561d26d{display:flex;justify-content:space-between;align-items:center;padding:30rpx 0;border-bottom:1rpx solid #f5f5f5;font-size:30rpx;color:#333}.picker-popup .picker-item.data-v-5561d26d:last-child{border-bottom:none}.picker-popup .picker-item.picker-item-active.data-v-5561d26d{color:#2667e9}.area-color-dot.data-v-5561d26d{width:24rpx;height:24rpx;border-radius:50%;margin-right:16rpx}.address-popup.data-v-5561d26d{width:600rpx;background:#fff;border-radius:20rpx;overflow:hidden}.address-popup-body.data-v-5561d26d{padding:30rpx;max-height:500rpx}.address-popup-body .search-box.data-v-5561d26d{margin-bottom:20rpx}.address-popup-body .search-box .search-input.data-v-5561d26d{width:100%;background:#f5f5f5;border-radius:8rpx;padding:16rpx 20rpx;font-size:28rpx}.address-popup-body .address-list.data-v-5561d26d{max-height:350rpx;overflow-y:auto}.address-popup-body .address-item.data-v-5561d26d{padding:24rpx 20rpx;border-bottom:1rpx solid #eee;font-size:26rpx;color:#333}.address-popup-body .address-item.data-v-5561d26d:last-child{border-bottom:none}.address-popup-body .address-item.address-item-active.data-v-5561d26d{background:#ebf2fc;color:#2667e9}.u-tag{justify-content:center!important}
|
||||
1
unpackage/dist/build/mp-weixin/pages/hiddendanger/acceptance.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),t=require("../../request/api.js"),a=require("../../request/request.js");if(!Array){(e.resolveComponent("up-textarea")+e.resolveComponent("up-upload"))()}Math||((()=>"../../uni_modules/uview-plus/components/u-textarea/u-textarea.js")+(()=>"../../uni_modules/uview-plus/components/u-upload/u-upload.js"))();const s={__name:"acceptance",setup(s){const l=e.ref(""),i=e.ref(""),o=e.ref(""),r=e.reactive({rectifyPlan:"",rectifyResult:""}),n=e.ref([]),c=e.reactive({result:1,verifyRemark:""}),u=e.ref([]),d=e=>e?(e.startsWith("http://")||e.startsWith("https://"),a.toImageUrl(e)):"";e.onLoad((a=>{a.rectifyId&&(l.value=a.rectifyId),a.hazardId&&(i.value=a.hazardId),a.assignId&&(o.value=a.assignId),console.log("验收页面参数:",{rectifyId:l.value,hazardId:i.value,assignId:o.value}),(async()=>{if(i.value&&o.value)try{const a=await t.getHiddenDangerDetail({hazardId:i.value,assignId:o.value});if(0===a.code&&a.data){if(a.data.assigns&&a.data.assigns.length>0){const e=a.data.assigns[0];e.rectify&&(r.rectifyPlan=e.rectify.rectifyPlan||"",r.rectifyResult=e.rectify.rectifyResult||"",e.rectify.attachments&&(n.value=e.rectify.attachments),console.log("整改记录:",r),console.log("整改附件:",n.value))}}else e.index.showToast({title:a.msg||"获取详情失败",icon:"none"})}catch(a){console.error("获取隐患详情失败:",a),e.index.showToast({title:"请求失败",icon:"none"})}})()}));const f=()=>{e.index.navigateBack()},p=async()=>{if(!l.value)return void e.index.showToast({title:"缺少整改ID",icon:"none"});const a=u.value.map((e=>{let t="";"string"==typeof e.url?t=e.url:e.url&&"object"==typeof e.url&&(t=e.url.url||e.url.path||"");return{fileName:("string"==typeof t&&t?t.split("/").pop():e.name||"")||"",filePath:t||"",fileType:e.type||"image/png",fileSize:e.size||0}})),s={rectifyId:Number(l.value),result:c.result,verifyRemark:c.verifyRemark||"",attachments:a};console.log("提交验收参数:",s);try{const a=await t.acceptanceRectification(s);0===a.code?(e.index.showToast({title:"验收成功",icon:"success"}),setTimeout((()=>{e.index.navigateBack()}),1500)):e.index.showToast({title:a.msg||"验收失败",icon:"none"})}catch(i){console.error("验收失败:",i),e.index.showToast({title:"请求失败",icon:"none"})}},v=e=>{u.value.splice(e.index,1)},m=async e=>{let t=[].concat(e.file),a=u.value.length;t.map((e=>{u.value.push({...e,status:"uploading",message:"上传中"})}));for(let s=0;s<t.length;s++){const e=await g(t[s].url);let l=u.value[a];u.value.splice(a,1,{...l,status:"success",message:"",url:e}),a++}},g=t=>new Promise(((s,l)=>{e.index.uploadFile({url:a.baseUrl+"/frontend/attachment/upload",filePath:t,name:"file",header:{Authorization:a.getToken()},success:e=>{const t=JSON.parse(e.data);0===t.code?s(t.data):l(t.msg||"上传失败")},fail:e=>{console.error("上传失败:",e),l(e)}})}));return(t,a)=>e.e({a:e.t(r.rectifyPlan||"暂无"),b:e.t(r.rectifyResult||"暂无"),c:n.value.length>0},n.value.length>0?{d:e.f(n.value,((t,a,s)=>({a:a,b:d(t.filePath),c:e.o((t=>(t=>{const a=n.value.map((e=>d(e.filePath)));e.index.previewImage({current:t,urls:a})})(a)),a)})))}:{},{e:e.n(1===c.result?"active":""),f:e.o((e=>c.result=1)),g:e.n(2===c.result?"active":""),h:e.o((e=>c.result=2)),i:e.o((e=>c.verifyRemark=e)),j:e.p({placeholder:"请输入验收备注",modelValue:c.verifyRemark}),k:e.o(m),l:e.o(v),m:e.p({fileList:u.value,name:"1",multiple:!0,maxCount:10}),n:e.o(f),o:e.o(p),p:e.gei(t,"")})}},l=e._export_sfc(s,[["__scopeId","data-v-380a93d8"]]);wx.createPage(l);
|
||||