KeXuCong 3 months ago
parent
commit
cad0a1a09f
  1. 5
      jwtech-h5-page/api/common/upload.js
  2. 53
      jwtech-h5-page/api/system/check/enteInfo.js
  3. 62
      jwtech-h5-page/api/system/check/inspections.js
  4. 53
      jwtech-h5-page/api/system/check/rectification.js
  5. 10
      jwtech-h5-page/api/system/projectStatistics.js
  6. 71
      jwtech-h5-page/components/echarts-uniapp/echarts.min.js
  7. 421
      jwtech-h5-page/components/monitor-add/monitor-add.vue
  8. 269
      jwtech-h5-page/components/problem-add/problem-add.vue
  9. 323
      jwtech-h5-page/pages/monitoring/edit/index.vue
  10. 84
      jwtech-h5-page/pages/monitoring/list/index.vue
  11. 296
      jwtech-h5-page/pages/monitoring/problem/add.vue
  12. 289
      jwtech-h5-page/pages/monitoring/problem/edit.vue
  13. 193
      jwtech-h5-page/pages/monitoring/problem/list.vue
  14. 126
      jwtech-h5-page/pages/statistics/generate.vue
  15. 275
      jwtech-h5-page/pages/statistics/index.vue
  16. 4
      jwtech-h5-page/static/scss/common.scss

5
jwtech-h5-page/api/common/upload.js

@ -21,9 +21,12 @@ export function exportTemplate() {
// 文件上传
export function uploadFileData(data) {
return request({
header: {
'Content-Type': 'multipart/form-data',
},
url: '/common/upload',
method: 'post',
data: data
data
})
}

53
jwtech-h5-page/api/system/check/enteInfo.js

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询企业信息管理列表
export function listInfo(query) {
return request({
url: '/build/enteInfo/list',
method: 'post',
data: query
})
}
// 查询企业信息管理详细
export function getInfo(id) {
return request({
url: '/build/enteInfo/' + id,
method: 'get'
})
}
// 新增企业信息管理
export function addInfo(data) {
return request({
url: '/build/enteInfo',
method: 'post',
data: data
})
}
// 修改企业信息管理
export function updateInfo(data) {
return request({
url: '/build/enteInfo',
method: 'put',
data: data
})
}
// 删除企业信息管理
export function delInfo(id) {
return request({
url: '/build/enteInfo/' + id,
method: 'delete'
})
}
// 导出企业信息管理
export function exportInfo(query) {
return request({
url: '/build/enteInfo/export',
method: 'get',
params: query
})
}

62
jwtech-h5-page/api/system/check/inspections.js

@ -0,0 +1,62 @@
import request from '@/utils/request'
// 查询监管检查和问题新增
export function addNewInspections(query) {
return request({
url: '/warn/inspections/new/add',
method: 'post',
data: query
})
}
// 查询监管检查列表
export function listInspections(query) {
return request({
url: '/warn/inspections/list',
method: 'post',
data: query
})
}
// 查询监管检查详细
export function getInspections(id) {
return request({
url: '/warn/inspections/' + id,
method: 'get'
})
}
// 新增监管检查
export function addInspections(data) {
return request({
url: '/warn/inspections',
method: 'post',
data: data
})
}
// 修改监管检查
export function updateInspections(data) {
return request({
url: '/warn/inspections',
method: 'put',
data: data
})
}
// 删除监管检查
export function delInspections(id) {
return request({
url: '/warn/inspections/' + id,
method: 'delete'
})
}
// 导出监管检查
export function exportInspections(query) {
return request({
url: '/warn/inspections/export',
method: 'get',
params: query
})
}

53
jwtech-h5-page/api/system/check/rectification.js

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询整改通知书列表
export function listRectification(query) {
return request({
url: '/warn/rectification/list',
method: 'post',
data: query
})
}
// 查询整改通知书详细
export function getRectification(id) {
return request({
url: '/warn/rectification/' + id,
method: 'get'
})
}
// 新增整改通知书
export function addRectification(data) {
return request({
url: '/warn/rectification',
method: 'post',
data: data
})
}
// 修改整改通知书
export function updateRectification(data) {
return request({
url: '/warn/rectification',
method: 'put',
data: data
})
}
// 删除整改通知书
export function delRectification(id) {
return request({
url: '/warn/rectification/' + id,
method: 'delete'
})
}
// 导出整改通知书
export function exportRectification(query) {
return request({
url: '/warn/rectification/export',
method: 'get',
params: query
})
}

10
jwtech-h5-page/api/system/projectStatistics.js

@ -6,7 +6,7 @@ export function getSourceFundsNumApi(params){
url:'/statistics/assert/getSourceFundsNum',
method:'get',
params,
timeout: 1000 * 60
timeout: 1000 * 120
})
}
@ -16,7 +16,7 @@ export function getCategoryumApi(data){
url:'/statistics/assert/getHistogram',
method:'post',
data,
timeout: 1000 * 60
timeout: 1000 * 120
})
}
@ -26,7 +26,7 @@ export function getProjectTypeApi(data){
url:'/statistics/assert/getTypeNum',
method:'post',
data,
timeout: 1000 * 60
timeout: 1000 * 120
})
}
@ -35,7 +35,7 @@ export function getCityNumApi(){
return request({
url:'/statistics/assert/map/city',
method:'post',
timeout: 1000 * 60
timeout: 1000 * 120
})
}
@ -44,6 +44,6 @@ export function getWarningNumApi(){
return request({
url:'/statistics/assert/forewarningNum',
method:'get',
timeout: 1000 * 60
timeout: 1000 * 120
})
}

71
jwtech-h5-page/components/echarts-uniapp/echarts.min.js

File diff suppressed because one or more lines are too long

421
jwtech-h5-page/components/monitor-add/monitor-add.vue

@ -0,0 +1,421 @@
<template>
<view>
<view class="cc-card cc-form-card">
<view class="form-title">监督检查</view>
<view class="form-item">
<text class="form-label">项目名称</text>
<view class="form-content">
<input v-model="form.projectName" class="form-input" placeholder="请选择项目名称" disabled/>
<picker mode="selector" :range="projectNames" @change="onProjectChange">
<view class="form-select">
选择
</view>
</picker>
</view>
</view>
<view class="form-item">
<text class="form-label">检查类型</text>
<view class="form-content">
<input v-model="showForm.checkType" class="form-input" placeholder="请选择检查类型" disabled/>
<picker mode="selector" :range="checkNameTypes" @change="onCheckTypeChange">
<view class="form-select">
选择
</view>
</picker>
</view>
</view>
<view class="form-item">
<text class="form-label">检查时间</text>
<view class="form-content">
<input v-model="form.inspectionTime" class="form-input" placeholder="请选择检查时间" disabled/>
<picker mode="date" @change="onCheckTimeChange">
<view class="form-select">
选择
</view>
</picker>
</view>
</view>
<view class="form-item">
<text class="form-label">检查单位</text>
<view class="form-content">
<input v-model="form.inspectionUnit" class="form-input" placeholder="请输入检查单位" />
</view>
</view>
<view class="form-item">
<text class="form-label">被检查单位</text>
<view class="form-content">
<input v-model="form.inspectionPerson" class="form-input" placeholder="请输入被检查单位" />
</view>
</view>
<view class="form-item">
<text class="form-label">组成成员</text>
<view class="form-content">
<input v-model="form.constituentMember" class="form-input" placeholder="请输入组成成员" />
</view>
</view>
</view>
<view class="cc-form-card" style="margin-top: 16px;">
<view class="form-title">
<view>检查通知</view>
<view class="form-tips">支持pngjpgpdfword等格式不大于200M</view>
</view>
<view class="form-item" style="margin-bottom: 0;">
<uni-file-picker
:autoUpload="false"
file-mediatype="all"
file-extname="png,jpg,pdf,,doc,docx,xls,xlsx"
limit="10"
@select="handleSelectCheckFile"
@success="handleCheckFileSuccess"
></uni-file-picker>
</view>
</view>
<view class="cc-form-card" style="margin-top: 16px;">
<view class="form-title">
<view>整改通知</view>
<view class="form-tips">支持pngjpgpdfword等格式不大于200M</view>
</view>
<view class="form-item" style="margin-bottom: 0;">
<uni-file-picker limit="10" file-mediatype="all" file-extname="png,jpg,pdf,,doc,docx,xls,xlsx" @success="handleModifyFileSuccess"></uni-file-picker>
</view>
</view>
<view class="cc-form-card" style="margin-top: 16px;">
<view class="form-title">
<view>整改回复</view>
<view class="form-tips">支持pngjpgpdfword等格式不大于200M</view>
</view>
<view class="form-item" style="margin-bottom: 0;">
<uni-file-picker limit="10" file-mediatype="all" file-extname="png,jpg,pdf,,doc,docx,xls,xlsx" @success="handleReplyFileSuccess"></uni-file-picker>
</view>
</view>
</view>
</template>
<script>
import { getProjectListApi } from '@/api/system/project'
import { addNewInspections, getInspections, updateInspections } from '@/api/system/check/inspections'
import { addInspectionsDraft, getInspectionsDraft, updateInspectionsDraft } from '@/api/system/check/inspectionsDraft'
export default {
name: "MonitorAdd",
props: {
monitorDraftId: {
type: String,
default: ''
},
monitorId: {
type: String,
default: ''
}
},
data() {
return {
form: {
"menuType": "0",
"inspectionTypes": null,
"inspectionTime": "",
"inspectionPerson": "",
"constituentMember": "",
"noticeAttachment": "",
"checklist": "",
"rectificationReport": null,
"createTime": null,
"updateTime": null,
"remark": null,
"createUid": null,
"updateUid": null,
"owerDept": null,
"proCode": "",
"proNo": "",
"projectName": "",
"checkType": "",
"inspectionUnit": "",
"rectificationDtoList": []
},
showForm: {
checkType: ''
},
projectNames: [],
checkTypes: [],
checkNameTypes: [],
queryParams: {
pageNum: 1,
pageSize: 10,
params: {orderBy: "create_time", sortBy: "desc"},
data: {
projectName: ''
}
},
projects: [],
projectNames: []
}
},
created() {
console.log("88888888888888888888888")
console.log(this.monitorId)
this.getProjectList()
this.getDicts("check_type").then((response) =>{
this.checkTypes = response.data
this.checkNameTypes = this.checkTypes.map(item => item.dictLabel)
})
if (this.monitorDraftId) {
getInspectionsDraft(this.draftId).then(res => {
this.form = res.data
this.showForm.checkType = this.checkTypeFormat(this.form.checkType)
})
} else if (this.monitorId) {
getInspections(this.monitorId).then(res => {
this.form = res.data
this.showForm.checkType = this.checkTypeFormat(this.form.checkType)
})
}
},
methods: {
//
getProjectList() {
uni.showLoading({
title: '加载中...',
mask: true
})
getProjectListApi(this.queryParams).then(res => {
this.projects = res.records
this.projectNames = this.projects.map(item => item.projectName)
uni.hideLoading()
})
},
//
onProjectChange(e) {
const index = e.detail.value
this.form.projectName = this.projects[index].projectName
this.form.proNo = this.projects[index].id
this.form.proCode = this.projects[index].proCode
this.$forceUpdate()
},
onCheckTypeChange(e) {
this.showForm.checkType = this.checkTypes[e.detail.value].dictLabel
this.form.checkType = this.checkTypes[e.detail.value].dictValue
},
onCheckTimeChange(e) {
this.form.inspectionTime = e.detail.value
},
//
checkTypeFormat(checkType, column) {
return this.selectDictLabel(
this.checkTypes,
checkType
);
},
handleSelectCheckFile(e) {
const tempFiles = e.tempFiles
tempFiles.forEach(item => {
const reader = new FileReader()
reader.onload = (e) => {
const fileRaw = e.target.result
console.log(e.target.result) //
let formData = new FormData()
formData.append('file', fileRaw);
uploadFileData(formData).then(res => {
uni.showToast({
title: `添加成功!`,
icon: 'none'
})
})
}
reader.readAsText(item.file)
// uni.readFile({
// filePath: item, //
// encoding: 'utf8', //
// success: (res) => {
// console.log(':', res.data); //
// },
// fail: (err) => {
// console.error(':', err);
// }
// });
})
// const tempFiles = e.tempFiles
// tempFiles.forEach(item => {
// uploadFileData({ file: item.file }).then(res => {
// console.log(res)
// })
// })
// console.log("1111111111")
// console.log(e)
},
//
judgeAttrWrite() {
const form = this.form
if (!form.projectName) {
uni.showToast({
title: `项目名称不能为空!`,
icon: 'none'
})
return false
}
if (!form.checkType) {
uni.showToast({
title: `检查类型不能为空!`,
icon: 'none'
})
return false
}
if (!form.inspectionTime) {
uni.showToast({
title: `检查时间不能为空!`,
icon: 'none'
})
return false
}
if (!form.inspectionUnit) {
uni.showToast({
title: `检查单位不能为空!`,
icon: 'none'
})
return false
}
if (!form.inspectionPerson) {
uni.showToast({
title: `被检查单位不能为空!`,
icon: 'none'
})
return false
}
if (!form.constituentMember) {
uni.showToast({
title: `组成成员不能为空!`,
icon: 'none'
})
return false
}
// if (!form.noticeAttachment) {
// uni.showToast({
// title: ``,
// icon: 'none'
// })
// return false
// }
// if (!form.checklist) {
// uni.showToast({
// title: ``,
// icon: 'none'
// })
// return false
// }
// if (!form.rectificationReport) {
// uni.showToast({
// title: ``,
// icon: 'none'
// })
// return false
// }
return true
},
//
handleConfirm() {
if (!this.judgeAttrWrite()) {
return
}
uni.showLoading({
title: '加载中...',
mask: true
})
console.log("88888888", this.form)
addNewInspections(this.form).then(res => {
uni.showToast({
title: `操作成功`,
icon: 'none'
})
uni.navigateTo({
url: `/pages/monitoring/list/index`
});
})
},
//
handleConfirmDraft() {
if (!this.judgeAttrWrite()) {
return
}
uni.showLoading({
title: '加载中...',
mask: true
})
console.log("88888888", this.form)
if (this.draftId) {
this.form.id = this.draftId
updateInspectionsDraft(this.form).then(res => {
uni.showToast({
title: `操作成功`,
icon: 'none'
})
uni.navigateTo({
url: `/pages/monitoring/list/index`
});
})
} else {
addInspectionsDraft(this.form).then(res => {
uni.showToast({
title: `操作成功`,
icon: 'none'
})
uni.navigateTo({
url: `/pages/monitoring/list/index`
});
})
}
},
//
handleConfirmMonitor() {
if (this.monitorId) {
updateInspections(this.form).then(res => {
uni.showToast({
title: `操作成功`,
icon: 'none'
})
uni.navigateTo({
url: `/pages/monitoring/list/index`
});
})
} else {
addNewInspections(this.form).then(res => {
uni.showToast({
title: `操作成功`,
icon: 'none'
})
uni.navigateTo({
url: `/pages/monitoring/list/index`
});
})
}
},
}
}
</script>
<style lang="scss" scoped>
</style>

269
jwtech-h5-page/components/problem-add/problem-add.vue

@ -0,0 +1,269 @@
<template>
<view>
<view class="cc-form-card cc-card form-card">
<view class="form-title">添加问题</view>
<view class="form-item">
<text class="form-label">责任单位</text>
<view class="form-content">
<input v-model="form.responsibleUnit" class="form-input" placeholder="请选择责任单位" disabled/>
<picker mode="selector" :range="unitNameOptions" @change="onUnitNameChange">
<view class="form-select">
选择
</view>
</picker>
</view>
</view>
<view class="form-item">
<text class="form-label">单位类型</text>
<view class="form-content">
<input v-model="showForm.unitType" class="form-input" placeholder="请选择单位类型" disabled/>
<view class="uni-picker" style="position:relative">
<view class="form-select">
选择
</view>
</view>
</view>
</view>
<view class="form-item">
<text class="form-label">检查时间</text>
<view class="form-content">
<input v-model="form.noticeBegainTime" class="form-input" placeholder="请选择检查时间" disabled/>
<picker mode="date" @change="handleDateChange">
<view class="form-select">
选择
</view>
</picker>
</view>
</view>
<view class="form-item">
<text class="form-label">问题描述<text class="number-limit">{{countBuildContentNumber}}/300</text></text>
<view class="form-content">
<textarea v-model="form.context" class="form-input" placeholder="请输入问题描述" rows="3" style="height: 51px;line-height: 17px;" maxlength="300"></textarea>
</view>
</view>
</view>
</view>
</template>
<script>
import { listInfo } from '@/api/system/check/enteInfo'
import { getRectification, addRectification, updateRectification } from '@/api/system/check/rectification'
export default {
props: {
inspectionId: {
type: String,
default: ''
},
problemId: {
type: String,
default: ''
}
},
data() {
return {
form: {
// inspectionId: this.$route.query.inspectionId,
proNo: this.$route.query.proNo,
proCode: this.$route.query.proCode,
responsibleUnit: '',
responsibleUnitType: '',
noticeBegainTime: '',
context: ''
},
showForm: {
unitType: ''
},
projectTypes: ['请选择', '建筑', 'IT', '教育', '制造业'], //
proNo: this.$route.query.proNo,
proCode: this.$route.query.proCode,
projectName: this.$route.query.projectName,
unitData: {},
unitOptions: [],
unitNameOptions: [],
unitTypeOptions: [
{
name: "设计单位",
value: "0",
},
{
name: "施工单位",
value: "1",
},
{
name: "监理单位",
value: "2",
},
{
name: "其他单位",
value: "3",
},
{
name: "项目法人",
value: "9",
},
],
//
unitParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
proCode: null,
proNo: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sort: "desc",
},
},
menuType: this.$route.query.menuType
}
},
computed: {
countBuildContentNumber() {
return this.form.context.length
}
},
created() {
this.getUnit()
if (this.problemId) {
getRectification(this.problemId).then(res => {
this.form = res.data
})
}
},
methods: {
getUnit() {
this.unitParams.data.proNo = this.proNo
this.unitParams.data.proCode = this.proCode
listInfo(this.unitParams).then((response) => {
this.unitData = response.data
if (response.data) {
this.unitOptions = response.data.enterpriseInfoList || []
this.unitOptions.push({
id: this.unitData.projectLegalPerson,
enterpriseName: this.unitData.projectLegalPerson,
enterpriseType: "9"
})
if (this.menuType == "0") {
this.unitOptions=[]
this.unitOptions.unshift({
id: this.unitData.projectLegalPerson,
enterpriseName: this.unitData.projectLegalPerson,
enterpriseType: "9",
});
}
}
this.unitNameOptions = this.unitOptions.map(item => item.enterpriseName)
});
},
//
onUnitNameChange(e) {
// this.form.region = e.detail.value;
const index = e.detail.value
this.form.responsibleUnit = this.unitOptions[index].enterpriseName
this.form.responsibleUnitType = this.unitOptions[index].enterpriseType
this.showForm.unitType = this.unitTypesFormat(this.form)
},
//
unitTypesFormat(row, column) {
for (let i=0; i<this.unitTypeOptions.length; i++) {
if (row.responsibleUnitType == this.unitTypeOptions[i].value) {
return this.unitTypeOptions[i].name
}
}
},
handleDateChange(e) {
this.form.noticeBegainTime = e.detail.value
},
//
judgeAttrWrite() {
const form = this.form
if (!form.responsibleUnit) {
uni.showToast({
title: `责任单位不能为空!`,
icon: 'none'
})
return false
}
if (!form.responsibleUnitType) {
uni.showToast({
title: `单位类型不能为空!`,
icon: 'none'
})
return false
}
if (!form.noticeBegainTime) {
uni.showToast({
title: `检查时间不能为空!`,
icon: 'none'
})
return false
}
if (!form.context) {
uni.showToast({
title: `问题描述不能为空!`,
icon: 'none'
})
return false
}
return true
},
//
submitForm() {
if (!this.judgeAttrWrite()) {
return
}
uni.showLoading({
title: '加载中...',
mask: true
})
//
console.log("提交的表单数据:", this.form);
//
if (this.problemId) {
this.form.id = this.problemId
updateRectification(this.form).then(res => {
uni.showToast({
title: `操作成功`,
icon: 'none'
})
uni.navigateTo({
url: `/pages/monitoring/problem/list?id=${this.proNo}&proCode=${this.proCode}&projectName=${this.projectName}`
});
})
} else {
addRectification(this.form).then(res => {
uni.showToast({
title: `操作成功`,
icon: 'none'
})
uni.navigateTo({
url: `/pages/monitoring/problem/list?id=${this.proNo}&proCode=${this.proCode}&projectName=${this.projectName}`
});
})
}
},
cancelForm() {
uni.navigateBack()
}
}
}
</script>

323
jwtech-h5-page/pages/monitoring/edit/index.vue

@ -1,13 +1,13 @@
<template>
<view class="project-add">
<!-- 项目新增表单卡片 -->
<view class="cc-card cc-form-card">
<!-- <view class="cc-card cc-form-card">
<view class="form-title">监督检查</view>
<view class="form-item">
<text class="form-label">项目名称</text>
<view class="form-content">
<input v-model="form.projectName" class="form-input" placeholder="请选择项目名称" disabled/>
<picker mode="selector" :range="projectNames" @change="onRegionChange">
<picker mode="selector" :range="projectNames" @change="onProjectChange">
<view class="form-select">
选择
</view>
@ -18,7 +18,7 @@
<view class="form-item">
<text class="form-label">检查类型</text>
<view class="form-content">
<input v-model="form.projectName" class="form-input" placeholder="请选择检查类型" disabled/>
<input v-model="showForm.checkType" class="form-input" placeholder="请选择检查类型" disabled/>
<picker mode="selector" :range="checkNameTypes" @change="onCheckTypeChange">
<view class="form-select">
选择
@ -30,8 +30,8 @@
<view class="form-item">
<text class="form-label">检查时间</text>
<view class="form-content">
<input v-model="form.projectName" class="form-input" placeholder="请选择检查时间" disabled/>
<picker mode="date" @change="onCheckTypeChange">
<input v-model="form.inspectionTime" class="form-input" placeholder="请选择检查时间" disabled/>
<picker mode="date" @change="onCheckTimeChange">
<view class="form-select">
选择
</view>
@ -42,7 +42,7 @@
<view class="form-item">
<text class="form-label">检查单位</text>
<view class="form-content">
<input v-model="form.projectCode" class="form-input" placeholder="请输入检查单位" />
<input v-model="form.inspectionUnit" class="form-input" placeholder="请输入检查单位" />
</view>
</view>
@ -50,14 +50,14 @@
<view class="form-item">
<text class="form-label">被检查单位</text>
<view class="form-content">
<input v-model="form.legalEntity" class="form-input" placeholder="请输入被检查单位" />
<input v-model="form.inspectionPerson" class="form-input" placeholder="请输入被检查单位" />
</view>
</view>
<view class="form-item">
<text class="form-label">组成成员</text>
<view class="form-content">
<input v-model="form.projectLeader" class="form-input" placeholder="请输入组成成员" />
<input v-model="form.constituentMember" class="form-input" placeholder="请输入组成成员" />
</view>
</view>
</view>
@ -100,12 +100,14 @@
<view class="form-item" style="margin-bottom: 0;">
<uni-file-picker limit="10" file-mediatype="all" file-extname="png,jpg,pdf,,doc,docx,xls,xlsx" @success="handleReplyFileSuccess"></uni-file-picker>
</view>
</view>
</view> -->
<monitor-add ref="monitorAdd" :monitorDraftId="draftId" />
<view class="cc-operation-row operation-row">
<view class="buttons-group">
<view class="button primary-button">确定</view>
<view class="button default-button">暂存</view>
<view class="button primary-button" @click="handleConfirm">确定</view>
<view class="button default-button" @click="handleConfirmDraft">暂存</view>
</view>
</view>
</view>
@ -114,7 +116,13 @@
<script>
import { getProjectListApi } from '@/api/system/project'
import { uploadFileData } from '@/api/common/upload'
import { addNewInspections } from '@/api/system/check/inspections'
import { addInspectionsDraft, getInspectionsDraft, updateInspectionsDraft } from '@/api/system/check/inspectionsDraft'
import MonitorAdd from '@/components/monitor-add/monitor-add.vue'
export default {
components: {
MonitorAdd
},
data() {
return {
// form: {
@ -127,29 +135,32 @@ export default {
// leaderPhone: '',
// legalRep: ''
// },
draftId: this.$route.query.draftId,
form: {
"menuType": "0",
"inspectionTypes": null,
"inspectionTime": "2024-12-30",
"inspectionPerson": "1",
"constituentMember": "1",
"noticeAttachment": "[{\"name\":\"新建文本文档.txt\",\"uid\":1736401705706,\"status\":\"success\"}]",
"checklist": "[{\"name\":\"新建文本文档.txt\",\"uid\":1736401758233,\"status\":\"success\"}]",
"rectificationReport": null,
"createTime": null,
"updateTime": null,
"remark": null,
"createUid": null,
"updateUid": null,
"owerDept": null,
"proCode": "2222222",
"proNo": "2a279d3d01ea4772874abea6813cb273",
"projectName": "测试0107-新000000",
"checkType": "0",
"inspectionUnit": "1",
"rectificationDtoList": []
"menuType": "0",
"inspectionTypes": null,
"inspectionTime": "",
"inspectionPerson": "",
"constituentMember": "",
"noticeAttachment": "",
"checklist": "",
"rectificationReport": null,
"createTime": null,
"updateTime": null,
"remark": null,
"createUid": null,
"updateUid": null,
"owerDept": null,
"proCode": "",
"proNo": "",
"projectName": "",
"checkType": "",
"inspectionUnit": "",
"rectificationDtoList": []
},
showForm: {
checkType: ''
},
projectTypes: ['请选择', '建筑', 'IT', '教育', '制造业'], //
checkTypes: [],
checkNameTypes: [],
queryParams: {
@ -157,19 +168,25 @@ export default {
pageSize: 10,
params: {orderBy: "create_time", sortBy: "desc"},
data: {
projectName: '测试0107'
projectName: ''
}
},
projects: [],
projectNames: []
projectNames: [],
};
},
created() {
// this.getProjectList()
this.getDicts("check_type").then((response) =>{
this.checkTypes = response.data
this.checkNameTypes = this.checkTypes.map(item => item.dictLabel)
})
// this.getDicts("check_type").then((response) =>{
// this.checkTypes = response.data
// this.checkNameTypes = this.checkTypes.map(item => item.dictLabel)
// })
// if (this.draftId) {
// getInspectionsDraft(this.draftId).then(res => {
// this.form = res.data
// this.showForm.checkType = this.checkTypeFormat(this.form.checkType)
// })
// }
},
methods: {
//
@ -186,27 +203,58 @@ export default {
},
//
onRegionChange(e) {
this.form.region = e.detail.value;
onProjectChange(e) {
const index = e.detail.value
this.form.projectName = this.projects[index].projectName
this.form.proNo = this.projects[index].id
this.form.proCode = this.projects[index].proCode
this.$forceUpdate()
},
onCheckTypeChange(e) {
this.showForm.checkType = this.checkTypes[e.detail.value].dictLabel
this.form.checkType = this.checkTypes[e.detail.value].dictValue
},
onCheckTimeChange(e) {
this.form.inspectionTime = e.detail.value
},
//
checkTypeFormat(checkType, column) {
return this.selectDictLabel(
this.checkTypes,
checkType
);
},
handleSelectCheckFile(e) {
const tempFilePaths = e.tempFilePaths
tempFilePaths.forEach(item => {
uni.readFile({
filePath: item, //
encoding: 'utf8', //
success: (res) => {
console.log('文件内容:', res.data); //
},
fail: (err) => {
console.error('读取文件失败:', err);
}
});
const tempFiles = e.tempFiles
tempFiles.forEach(item => {
const reader = new FileReader()
reader.onload = (e) => {
const fileRaw = e.target.result
console.log(e.target.result) //
let formData = new FormData()
formData.append('file', fileRaw);
uploadFileData(formData).then(res => {
uni.showToast({
title: `添加成功!`,
icon: 'none'
})
})
}
reader.readAsText(item.file)
// uni.readFile({
// filePath: item, //
// encoding: 'utf8', //
// success: (res) => {
// console.log(':', res.data); //
// },
// fail: (err) => {
// console.error(':', err);
// }
// });
})
// const tempFiles = e.tempFiles
@ -233,11 +281,135 @@ export default {
console.log("1111111111")
console.log(e)
},
//
submitForm() {
//
console.log("提交的表单数据:", this.form);
//
//
judgeAttrWrite() {
const form = this.form
if (!form.projectName) {
uni.showToast({
title: `项目名称不能为空!`,
icon: 'none'
})
return false
}
if (!form.checkType) {
uni.showToast({
title: `检查类型不能为空!`,
icon: 'none'
})
return false
}
if (!form.inspectionTime) {
uni.showToast({
title: `检查时间不能为空!`,
icon: 'none'
})
return false
}
if (!form.inspectionUnit) {
uni.showToast({
title: `检查单位不能为空!`,
icon: 'none'
})
return false
}
if (!form.inspectionPerson) {
uni.showToast({
title: `被检查单位不能为空!`,
icon: 'none'
})
return false
}
if (!form.constituentMember) {
uni.showToast({
title: `组成成员不能为空!`,
icon: 'none'
})
return false
}
// if (!form.noticeAttachment) {
// uni.showToast({
// title: ``,
// icon: 'none'
// })
// return false
// }
// if (!form.checklist) {
// uni.showToast({
// title: ``,
// icon: 'none'
// })
// return false
// }
// if (!form.rectificationReport) {
// uni.showToast({
// title: ``,
// icon: 'none'
// })
// return false
// }
return true
},
//
handleConfirm() {
// console.log("", this.form)
// if (!this.judgeAttrWrite()) {
// return
// }
// uni.showLoading({
// title: '...',
// mask: true
// })
// addNewInspections(this.form).then(res => {
// uni.showToast({
// title: ``,
// icon: 'none'
// })
// uni.navigateTo({
// url: `/pages/monitoring/list/index`
// });
// })
// ref
this.$refs.monitorAdd.handleConfirm()
},
//
handleConfirmDraft() {
// console.log("", this.form)
// if (!this.judgeAttrWrite()) {
// return
// }
// uni.showLoading({
// title: '...',
// mask: true
// })
// if (this.draftId) {
// this.form.id = this.draftId
// updateInspectionsDraft(this.form).then(res => {
// uni.showToast({
// title: ``,
// icon: 'none'
// })
// uni.navigateTo({
// url: `/pages/monitoring/list/index`
// });
// })
// } else {
// addInspectionsDraft(this.form).then(res => {
// uni.showToast({
// title: ``,
// icon: 'none'
// })
// uni.navigateTo({
// url: `/pages/monitoring/list/index`
// });
// })
// }
// ref
this.$refs.monitorAdd.handleConfirmDraft()
}
}
};
@ -246,43 +418,6 @@ export default {
<style lang="scss" scoped>
.project-add {
padding: 16px 20px 96px;
// .form-card {
// background-color: white;
// padding: 20px;
// border-radius: 10px;
// box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
// .form-title {
// font-size: 18px;
// padding-bottom: 16px;
// }
// .form-item {
// .form-label {
// font-size: 14px;
// color: #595959;
// margin-bottom: 6px;
// display: block;
// }
// margin-bottom: 20px;
// .form-content {
// position: relative;
// padding-bottom: 16px;
// border-bottom: 1px solid #f0f0f0;
// .form-input {
// width: 100%;
// height: 30px;
// border-radius: 5px;
// font-size: 14px;
// color: #333;
// }
// .form-select {
// position: absolute;
// bottom: 4px;
// right: 0;
// color: #00B39D;
// }
// }
// }
// }
}

84
jwtech-h5-page/pages/monitoring/list/index.vue

@ -58,13 +58,13 @@
</view>
<view v-if="activeTab===1" class="attr-item">
<view class="attr-title">检查类型</view>
<view class="attr-value">{{ project.district }}</view>
<view class="attr-value">{{ project.checkTypeName }}</view>
</view>
<view class="operate-buttons">
<view class="buttons-group">
<view v-if="activeTab===0" class="primary-button__text button" @click="handleSeeProblem(project)">查看</view>
<view v-if="activeTab==1" class="primary-button__text button" @click="handleEditProject(project)">编辑</view>
<view v-if="activeTab==1" class="error-button__text button" @click="handleEditProject(project)">删除</view>
<view v-if="activeTab==1" class="primary-button__text button" @click="handleEditProjectCheckDraft(project)">编辑</view>
<view v-if="activeTab==1" class="error-button__text button" @click="handleDeleteProject(project)">删除</view>
</view>
</view>
</view>
@ -78,12 +78,17 @@
<view class="primary-button button" @click="handleAddCheck()">新增检查</view>
</view>
</view>
<!-- 提示窗示例 -->
<uni-popup ref="delectDialog" type="dialog">
<uni-popup-dialog type="error" cancelText="取消" confirmText="确认" title="警告" content="是否确认删除该数据" @confirm="handleDeleteDialogConfirm"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import { projectCheckListApi } from '@/api/system/project'
import { listDraft } from '@/api/system/project/draft'
import { listInspectionsDraft, delInspectionsDraft } from '@/api/system/check/inspectionsDraft'
import { addressList } from '@/uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/cityData.js'
import NoDataView from '@/components/no-data-view/no-data-view.vue'
import RegionPicker from '@/components/region-picker/region-picker.vue'
@ -114,32 +119,27 @@ export default {
pageSize: 10,
params: {orderBy: "create_time", sortBy: "desc"},
data: {
projectName: ''
projectName: '',
menuType: '0'
}
},
projectCheckList: [],
pages: 0
pages: 0,
checkTypes: [],
deleteCheckDraftId: ''
};
},
computed: {
// filteredProjects() {
// return this.projects.filter(project => {
// //
// const matchesSearch = project.name.toLowerCase().includes(this.searchQuery.toLowerCase());
// const matchesDistrict = this.selectedDistrict === 0 || project.district === this.districts[this.selectedDistrict];
// const matchesType = this.selectedProjectType === 0 || project.type === this.projectTypes[this.selectedProjectType];
// return matchesSearch && matchesDistrict && matchesType;
// });
// }
},
created() {
this.getDicts("check_type").then((response) =>{
this.checkTypes = response.data
})
this.handleAddressTreeData()
this.getProjectCheckList()
this.judgeGetList()
},
onReachBottom() {
if (this.queryParams.pageNum < this.pages) {
this.queryParams.pageNum++; // 1
this.getProjectCheckList()
this.judgeGetList()
}
},
methods: {
@ -147,7 +147,7 @@ export default {
this.activeTab = index;
this.resetQuery()
this.projects = []
this.judgeGetList()
this.judgeGetList('again')
},
//
@ -163,18 +163,18 @@ export default {
},
//
judgeGetList() {
judgeGetList(mode) {
if (this.activeTab === 0) {
this.getProjectCheckList('again')
this.getProjectCheckList(mode)
} else if (this.activeTab === 1) {
this.getProjectCheckDraftList('again')
this.getProjectCheckDraftList(mode)
}
},
//
handleSearchProjectList() {
this.queryParams.pageNum = 1
this.getProjectCheckList('again')
this.judgeGetList('again')
},
//
@ -206,7 +206,7 @@ export default {
title: '加载中...',
mask: true
})
listDraft(this.queryParams).then(res => {
listInspectionsDraft(this.queryParams).then(res => {
if (mode === 'again') {
this.projectCheckList = []
uni.pageScrollTo({
@ -218,11 +218,41 @@ export default {
this.pages = res.pages
this.projectCheckList.forEach(projectItem => {
projectItem.adcdName = this.formatAdcd(projectItem)
projectItem.checkTypeName = this.checkTypesFormat(projectItem)
})
uni.hideLoading()
})
},
//
checkTypesFormat(row, column) {
return this.selectDictLabel(
this.checkTypes,
row.checkType
);
},
handleEditProjectCheckDraft(item) {
//
this.$tab.navigateTo(`/pages/monitoring/edit/index?draftId=${item.id}`);
},
handleDeleteProject(projectItem, pegeType) {
this.deleteCheckDraftId = projectItem.id
this.$refs.delectDialog.open()
},
//
handleDeleteDialogConfirm() {
delInspectionsDraft(this.deleteCheckDraftId).then(res => {
uni.showToast({
title: `删除项目成功`,
icon: 'none'
})
this.judgeGetList('again')
})
},
//
handleRegionParams(adcd) {
this.queryParams.pageNum = 1
@ -283,9 +313,9 @@ export default {
//
this.$tab.navigateTo(`/pages/monitoring/edit/index`);
},
handleSeeProblem() {
handleSeeProblem(item) {
//
this.$tab.navigateTo(`/pages/monitoring/problem/list`);
this.$tab.navigateTo(`/pages/monitoring/problem/list?id=${item.proNo}&proCode=${item.proCode}&projectName=${item.projectName}`);
}
}
};

296
jwtech-h5-page/pages/monitoring/problem/add.vue

@ -1,13 +1,13 @@
<template>
<view class="project-add">
<!-- 项目新增表单卡片 -->
<view class="form-card">
<!-- <view class="cc-form-card cc-card form-card">
<view class="form-title">添加问题</view>
<view class="form-item">
<text class="form-label">责任单位</text>
<view class="form-content">
<input v-model="form.projectName" class="form-input" placeholder="请选择责任单位" disabled/>
<picker mode="region" v-model="form.region" @change="onRegionChange">
<input v-model="form.responsibleUnit" class="form-input" placeholder="请选择责任单位" disabled/>
<picker mode="selector" :range="unitNameOptions" @change="onUnitNameChange">
<view class="form-select">
选择
</view>
@ -18,20 +18,20 @@
<view class="form-item">
<text class="form-label">单位类型</text>
<view class="form-content">
<input v-model="form.projectName" class="form-input" placeholder="请选择单位类型" disabled/>
<picker mode="selector" :range="projectTypes" v-model="form.projectType">
<input v-model="showForm.unitType" class="form-input" placeholder="请选择单位类型" disabled/>
<view class="uni-picker" style="position:relative">
<view class="form-select">
选择
</view>
</picker>
</view>
</view>
</view>
<view class="form-item">
<text class="form-label">检查时间</text>
<view class="form-content">
<input v-model="form.projectName" class="form-input" placeholder="请选择检查时间" disabled/>
<picker mode="selector" :range="projectTypes" v-model="form.projectType">
<input v-model="form.noticeBegainTime" class="form-input" placeholder="请选择检查时间" disabled/>
<picker mode="date" @change="handleDateChange">
<view class="form-select">
选择
</view>
@ -40,49 +40,217 @@
</view>
<view class="form-item">
<text class="form-label">问题描述</text>
<text class="form-label">问题描述<text class="number-limit">{{countBuildContentNumber}}/300</text></text>
<view class="form-content">
<textarea v-model="form.legalRep" class="form-input" placeholder="请输入问题描述" rows="3"></textarea>
<textarea v-model="form.context" class="form-input" placeholder="请输入问题描述" rows="3" style="height: 51px;line-height: 17px;" maxlength="300"></textarea>
</view>
</view>
</view>
</view> -->
<problem-add ref="ProblemAdd" :inspectionId="inspectionId" />
<view class="cc-operation-row operation-row">
<view class="buttons-group">
<view class="button primary-button">确定</view>
<view class="button default-button">取消</view>
<view class="button primary-button" @click="submitForm">确定</view>
<view class="button default-button" @click="cancelForm">取消</view>
</view>
</view>
</view>
</template>
<script>
import { listInfo } from '@/api/system/check/enteInfo'
import { getRectification, addRectification, updateRectification } from '@/api/system/check/rectification'
import ProblemAdd from '@/components/problem-add/problem-add'
export default {
components: {
ProblemAdd
},
data() {
return {
inspectionId:this.$route.query.inspectionId,
form: {
projectName: '',
region: [],
projectCode: '',
projectType: 0,
legalEntity: '',
projectLeader: '',
leaderPhone: '',
legalRep: ''
inspectionId: this.$route.query.inspectionId,
proNo: this.$route.query.proNo,
proCode: this.$route.query.proCode,
responsibleUnit: '',
responsibleUnitType: '',
noticeBegainTime: '',
context: ''
},
showForm: {
unitType: ''
},
projectTypes: ['请选择', '建筑', 'IT', '教育', '制造业'], //
proNo: this.$route.query.proNo,
proCode: this.$route.query.proCode,
projectName: this.$route.query.projectName,
unitData: {},
unitOptions: [],
unitNameOptions: [],
unitTypeOptions: [
{
name: "设计单位",
value: "0",
},
{
name: "施工单位",
value: "1",
},
{
name: "监理单位",
value: "2",
},
{
name: "其他单位",
value: "3",
},
{
name: "项目法人",
value: "9",
},
],
//
unitParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
proCode: null,
proNo: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sort: "desc",
},
},
menuType: this.$route.query.menuType
};
},
computed: {
countBuildContentNumber() {
return this.form.context.length
}
},
created() {
// this.getUnit()
},
methods: {
//
onRegionChange(e) {
this.form.region = e.detail.value;
getUnit() {
this.unitParams.data.proNo = this.proNo
this.unitParams.data.proCode = this.proCode
listInfo(this.unitParams).then((response) => {
this.unitData = response.data
if (response.data) {
this.unitOptions = response.data.enterpriseInfoList || []
this.unitOptions.push({
id: this.unitData.projectLegalPerson,
enterpriseName: this.unitData.projectLegalPerson,
enterpriseType: "9"
})
if (this.menuType == "0") {
this.unitOptions=[]
this.unitOptions.unshift({
id: this.unitData.projectLegalPerson,
enterpriseName: this.unitData.projectLegalPerson,
enterpriseType: "9",
});
}
}
this.unitNameOptions = this.unitOptions.map(item => item.enterpriseName)
});
},
//
onUnitNameChange(e) {
// this.form.region = e.detail.value;
const index = e.detail.value
this.form.responsibleUnit = this.unitOptions[index].enterpriseName
this.form.responsibleUnitType = this.unitOptions[index].enterpriseType
this.showForm.unitType = this.unitTypesFormat(this.form)
},
//
unitTypesFormat(row, column) {
for (let i=0; i<this.unitTypeOptions.length; i++) {
if (row.responsibleUnitType == this.unitTypeOptions[i].value) {
return this.unitTypeOptions[i].name
}
}
},
handleDateChange(e) {
this.form.noticeBegainTime = e.detail.value
},
//
judgeAttrWrite() {
const form = this.form
if (!form.responsibleUnit) {
uni.showToast({
title: `责任单位不能为空!`,
icon: 'none'
})
return false
}
if (!form.responsibleUnitType) {
uni.showToast({
title: `单位类型不能为空!`,
icon: 'none'
})
return false
}
if (!form.noticeBegainTime) {
uni.showToast({
title: `检查时间不能为空!`,
icon: 'none'
})
return false
}
if (!form.context) {
uni.showToast({
title: `问题描述不能为空!`,
icon: 'none'
})
return false
}
return true
},
//
submitForm() {
//
console.log("提交的表单数据:", this.form);
//
// if (!this.judgeAttrWrite()) {
// return
// }
// uni.showLoading({
// title: '...',
// mask: true
// })
// //
// console.log("", this.form);
// //
// addRectification(this.form).then(res => {
// uni.showToast({
// title: ``,
// icon: 'none'
// })
// uni.navigateTo({
// url: `/pages/monitoring/problem/list?id=${this.proNo}&proCode=${this.proCode}&projectName=${this.projectName}`
// });
// })
this.$refs.ProblemAdd.submitForm()
},
cancelForm() {
uni.navigateBack()
}
}
};
@ -91,43 +259,43 @@ export default {
<style lang="scss" scoped>
.project-add {
padding: 20px 20px 100px 20px;
.form-card {
background-color: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
.form-title {
font-size: 18px;
padding-bottom: 16px;
}
.form-item {
.form-label {
font-size: 14px;
color: #595959;
margin-bottom: 6px;
display: block;
}
margin-bottom: 20px;
.form-content {
position: relative;
padding-bottom: 16px;
border-bottom: 1px solid #f0f0f0;
.form-input {
width: 100%;
height: 30px;
border-radius: 5px;
font-size: 14px;
color: #333;
}
.form-select {
position: absolute;
bottom: 4px;
right: 0;
color: #00B39D;
}
}
}
}
// .form-card {
// background-color: white;
// padding: 20px;
// border-radius: 10px;
// box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
// .form-title {
// font-size: 18px;
// padding-bottom: 16px;
// }
// .form-item {
// .form-label {
// font-size: 14px;
// color: #595959;
// margin-bottom: 6px;
// display: block;
// }
// margin-bottom: 20px;
// .form-content {
// position: relative;
// padding-bottom: 16px;
// border-bottom: 1px solid #f0f0f0;
// .form-input {
// width: 100%;
// height: 30px;
// border-radius: 5px;
// font-size: 14px;
// color: #333;
// }
// .form-select {
// position: absolute;
// bottom: 4px;
// right: 0;
// color: #00B39D;
// }
// }
// }
// }
}

289
jwtech-h5-page/pages/monitoring/problem/edit.vue

@ -1,24 +1,26 @@
<template>
<view class="page">
<!-- Tabs栏 -->
<view class="cc-tabs">
<view class="tab" :class="{'active': activeTab === 0}" @click="changeTab(0)">
<view class="tab-text">检查信息</view>
</view>
<view class="tab" :class="{'active': activeTab === 1}" @click="changeTab(1)">
<view class="tab-text">问题修改</view>
<view class="cc-header">
<!-- Tabs栏 -->
<view class="cc-tabs">
<view class="tab" :class="{'active': activeTab === 0}" @click="changeTab(0)">
<view class="tab-text">检查信息</view>
</view>
<view class="tab" :class="{'active': activeTab === 1}" @click="changeTab(1)">
<view class="tab-text">问题修改</view>
</view>
</view>
</view>
<view v-if="activeTab === 0" class="tab-content check-info">
<!-- 项目新增表单卡片 -->
<view class="cc-form-card">
<!-- <view class="cc-form-card">
<view class="form-title">监督检查</view>
<view class="form-item">
<text class="form-label">项目名称</text>
<view class="form-content">
<input v-model="form.projectName" class="form-input" placeholder="请选择项目名称" disabled/>
<picker mode="region" v-model="form.region" @change="onRegionChange">
<picker mode="selector" :range="projectNames" @change="onProjectChange">
<view class="form-select">
选择
</view>
@ -29,8 +31,8 @@
<view class="form-item">
<text class="form-label">检查类型</text>
<view class="form-content">
<input v-model="form.projectName" class="form-input" placeholder="请选择检查类型" disabled/>
<picker mode="selector" :range="projectTypes" v-model="form.projectType">
<input v-model="form.checkType" class="form-input" placeholder="请选择检查类型" disabled/>
<picker mode="selector" :range="checkNameTypes" @change="onCheckTypeChange">
<view class="form-select">
选择
</view>
@ -41,19 +43,20 @@
<view class="form-item">
<text class="form-label">检查时间</text>
<view class="form-content">
<input v-model="form.projectName" class="form-input" placeholder="请选择检查时间" disabled/>
<picker mode="selector" :range="projectTypes" v-model="form.projectType">
<input v-model="form.inspectionTime" class="form-input" placeholder="请选择检查时间" disabled/>
<picker mode="date" @change="onCheckTimeChange">
<view class="form-select">
选择
</view>
</picker>
</view>
</view>
<view class="form-item">
<text class="form-label">检查单位</text>
<view class="form-content">
<input v-model="form.projectCode" class="form-input" placeholder="请输入检查单位" />
<input v-model="form.inspectionUnit" class="form-input" placeholder="请输入检查单位" />
</view>
</view>
@ -61,84 +64,93 @@
<view class="form-item">
<text class="form-label">被检查单位</text>
<view class="form-content">
<input v-model="form.legalEntity" class="form-input" placeholder="请输入被检查单位" />
<input v-model="form.inspectionPerson" class="form-input" placeholder="请输入被检查单位" />
</view>
</view>
<view class="form-item">
<text class="form-label">组成成员</text>
<view class="form-content">
<input v-model="form.projectLeader" class="form-input" placeholder="请输入组成成员" />
<input v-model="form.constituentMember" class="form-input" placeholder="请输入组成成员" />
</view>
</view>
</view>
<view class="cc-form-card" style="margin-top: 20px;">
<view class="cc-form-card" style="margin-top: 16px;">
<view class="form-title">
<view>检查通知</view>
<view class="form-tips">支持pngjpgpdfword等格式不大于200M</view>
</view>
<view class="form-item" style="margin-bottom: 0;">
<uni-file-picker limit="5" file-mediatype="all" title="最多选择5个文件"></uni-file-picker>
<uni-file-picker
:autoUpload="false"
file-mediatype="all"
file-extname="png,jpg,pdf,,doc,docx,xls,xlsx"
limit="10"
@select="handleSelectCheckFile"
@success="handleCheckFileSuccess"
></uni-file-picker>
</view>
</view>
<view class="cc-form-card" style="margin-top: 20px;">
<view class="cc-form-card" style="margin-top: 16px;">
<view class="form-title">
<view>整改通知</view>
<view class="form-tips">支持pngjpgpdfword等格式不大于200M</view>
</view>
<view class="form-item" style="margin-bottom: 0;">
<uni-file-picker limit="5" file-mediatype="all" title="最多选择5个文件"></uni-file-picker>
<uni-file-picker limit="10" file-mediatype="all" file-extname="png,jpg,pdf,,doc,docx,xls,xlsx" @success="handleModifyFileSuccess"></uni-file-picker>
</view>
</view>
<view class="cc-form-card" style="margin-top: 20px;">
<view class="cc-form-card" style="margin-top: 16px;">
<view class="form-title">
<view>整改回复</view>
<view class="form-tips">支持pngjpgpdfword等格式不大于200M</view>
</view>
<view class="form-item" style="margin-bottom: 0;">
<uni-file-picker limit="5" file-mediatype="all" title="最多选择5个文件"></uni-file-picker>
<uni-file-picker limit="10" file-mediatype="all" file-extname="png,jpg,pdf,,doc,docx,xls,xlsx" @success="handleReplyFileSuccess"></uni-file-picker>
</view>
</view>
</view> -->
<monitor-add ref="monitorAdd" :monitorId="monitorId" />
</view>
<view v-if="activeTab === 1" class="tab-content problem-info">
<!-- 项目列表 -->
<view class="cc-btn cc-primary-btn" @click="handleAddSingleProblem()">添加问题</view>
<view class="cc-project-list" style="padding: 0;">
<view v-for="(project, index) in filteredProjects" :key="index" class="project-card">
<view v-for="(project, index) in problemList" :key="index" class="project-card">
<view class="attr-item">
<view class="attr-title">责任单位</view>
<view class="attr-value">{{ project.code }}</view>
<view class="attr-value">{{ project.responsibleUnit }}</view>
</view>
<view class="attr-item">
<view class="attr-title">单位类型</view>
<view class="attr-value">{{ project.district }}</view>
<view class="attr-value">{{ project.unitTypeText }}</view>
</view>
<view class="attr-item">
<view class="attr-title">检查时间</view>
<view class="attr-value">{{ project.type }}</view>
<view class="attr-value">{{ project.noticeBegainTime }}</view>
</view>
<view class="attr-item">
<view class="attr-title">问题描述</view>
<view class="attr-value">{{ project.code }}</view>
<view class="attr-value">{{ project.context }}</view>
</view>
<view class="attr-item">
<view class="attr-title">处理状态</view>
<view class="attr-value">{{ project.district }}</view>
<view class="attr-value">{{ project.isFinishText }}</view>
</view>
<view class="attr-item">
<view class="attr-title">整改时间</view>
<view class="attr-value">{{ project.type }}</view>
<view class="attr-value">{{ project.feedbackTime }}</view>
</view>
<view class="attr-item">
<view class="attr-title">整改反馈</view>
<view class="attr-value">{{ project.type }}</view>
<view class="attr-value">{{ project.feedback }}</view>
</view>
<view class="operate-buttons">
<view class="buttons-group">
@ -153,30 +165,31 @@
<view class="cc-operation-row operation-row">
<view class="buttons-group">
<view class="button primary-button">确定</view>
<view class="button default-button">取消</view>
<view class="button primary-button" @click="handleConfirmMonitor">确定</view>
<view class="button default-button" @click="handleCancle">取消</view>
</view>
</view>
</view>
</template>
<script>
import { listRectification, getRectification, addRectification, updateRectification } from '@/api/system/check/rectification'
import { getProjectListApi } from '@/api/system/project'
import MonitorAdd from '@/components/monitor-add/monitor-add'
export default {
name: "MonitorProblemEdit",
components: {
MonitorAdd
},
data() {
return {
id: this.$route.query.id,
monitorId: this.$route.query.monitorId,
activeTab: 0, // Tab
searchQuery: '', //
selectedDistrict: 0, //
selectedProjectType: 0, //
form: {
projectName: '',
region: [],
projectCode: '',
projectType: 0,
legalEntity: '',
projectLeader: '',
leaderPhone: '',
legalRep: '',
},
projects: [ //
{ name: '项目1', code: 'P001', district: '北京市', type: '建筑', status: 1 },
@ -185,27 +198,128 @@ export default {
{ name: '项目4', code: 'P004', district: '北京市', type: '建筑', status: 1}
],
projectTypes: ['请选择', '建筑', 'IT', '教育', '制造业'], //
//
unitParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
proCode: null,
proNo: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sort: "desc",
},
},
proNo: this.$route.query.proNo,
proCode: this.$route.query.proCode,
unitData: {},
unitOptions: [],
unitTypeOptions: [
{
name: "设计单位",
value: "0",
},
{
name: "施工单位",
value: "1",
},
{
name: "监理单位",
value: "2",
},
{
name: "其他单位",
value: "3",
},
{
name: "项目法人",
value: "9",
},
],
checkTypes: [],
checkNameTypes: [],
projects: [],
projectNames: [],
queryParams: {
pageNum: 1,
pageSize: 10,
params: {orderBy: "create_time", sortBy: "desc"},
data: {
projectName: ''
}
},
problemQueryParams: {
pageNum: 1,
pageSize: 10,
params: {orderBy: "create_time", sortBy: "desc"},
data: {
projectName: ''
}
},
problemList: [],
isFinishOptions: [],
};
},
computed: {
filteredProjects() {
return this.projects.filter(project => {
//
const matchesSearch = project.name.toLowerCase().includes(this.searchQuery.toLowerCase());
const matchesDistrict = this.selectedDistrict === 0 || project.district === this.districts[this.selectedDistrict];
const matchesType = this.selectedProjectType === 0 || project.type === this.projectTypes[this.selectedProjectType];
return matchesSearch && matchesDistrict && matchesType;
});
created() {
this.getProjectList()
this.getDicts("check_type").then((response) =>{
this.checkTypes = response.data
this.checkNameTypes = this.checkTypes.map(item => item.dictLabel)
})
this.getDicts("rectification_completion").then((response) => {
this.isFinishOptions = response.data;
})
if (this.draftId) {
getInspectionsDraft(this.draftId).then(res => {
this.form = res.data
this.showForm.checkType = this.checkTypeFormat(this.form.checkType)
})
}
this.getProblemList()
},
methods: {
getProblemList() {
listRectification(this.problemQueryParams).then(res => {
this.problemList = res.records
this.problemList.forEach(item => {
item.unitTypeText = this.unitTypesFormat(item)
item.isFinishText = this.isFinishFormat(item)
})
})
},
//
getProjectList() {
uni.showLoading({
title: '加载中...',
mask: true
})
getProjectListApi(this.queryParams).then(res => {
this.projects = res.records
this.projectNames = this.projects.map(item => item.projectName)
uni.hideLoading()
})
},
// tab
changeTab(index) {
this.activeTab = index;
this.activeTab = index
},
//
onRegionChange(e) {
this.form.region = e.detail.value;
//
unitTypesFormat(row, column) {
for (let i=0; i<this.unitTypeOptions.length; i++) {
if (row.responsibleUnitType == this.unitTypeOptions[i].value) {
return this.unitTypeOptions[i].name
}
}
},
//
submitForm() {
//
@ -218,7 +332,64 @@ export default {
},
handleRectification() {
uni.navigateTo({ url: '/pages/monitoring/problem/rectification' });
}
},
handleConfirmMonitor() {
this.$refs.monitorAdd.handleConfirmMonitor()
},
handleCancle() {
uni.navigateBack()
},
getUnit() {
this.unitParams.data.proNo = this.proNo
this.unitParams.data.proCode = this.proCode
listInfo(this.unitParams).then((response) => {
this.unitData = response.data
this.unitOptions = response.data?.enterpriseInfoList;
this.unitOptions?.push({
id: this.unitData.projectLegalPerson,
enterpriseName: this.unitData.projectLegalPerson,
enterpriseType: "9"
})
if (this.menuType == "0") {
this.unitOptions=[]
this.unitOptions.unshift({
id: this.unitData.projectLegalPerson,
enterpriseName: this.unitData.projectLegalPerson,
enterpriseType: "9",
});
}
console.log(88888888888, this.unitOptions);
console.log(this.unitOptions)
});
},
//
checkTypeFormat(checkType, column) {
return this.selectDictLabel(
this.checkTypes,
checkType
);
},
isFinishFormat(row) {
return this.selectDictLabel(this.isFinishOptions, row.isFinish);
},
//
onUnitNameChange(e) {
// this.form.region = e.detail.value;
const index = e.detail.value
this.form.responsibleUnit = this.unitOptions[index].enterpriseName
this.form.responsibleUnitType = this.unitOptions[index].enterpriseType
this.showForm.unitType = this.unitTypesFormat(this.form)
},
handleDateChange(e) {
this.form.noticeBegainTime = e.detail.value
},
}
};
</script>
@ -226,7 +397,7 @@ export default {
<style lang="scss" scoped>
.page {
.tab-content {
padding: 16px 20px 100px 16px;
padding: 64px 20px 100px 16px;
}
}
</style>

193
jwtech-h5-page/pages/monitoring/problem/list.vue

@ -1,50 +1,53 @@
<template>
<view class="project">
<!-- 搜索框 -->
<view class="cc-search search-bar">
<view class="search-box">
<image src="/static/images/icon/search.png" />
<input v-model="searchQuery" type="text" placeholder="请输入项目名称或项目编号" />
<view class="cc-header">
<!-- 搜索框 -->
<view class="cc-search search-bar">
<view class="search-box">
<image src="/static/images/icon/search.png" />
<input v-model="searchQuery" type="text" placeholder="请输入项目名称" @confirm="handleSearchProjectList" />
</view>
</view>
<!-- 行政区划和项目类型下拉框 -->
<view class="cc-query-dropdowns dropdowns">
<picker mode="date" @change="handleDateChange">
<view class="dropdown">检查日期<image src="/static/images/icon/down.png" /></view>
</picker>
<picker mode="selector" :range="checkTypeNames" @change="handleCheckTypeChange">
<view class="dropdown">检查类型<image src="/static/images/icon/down.png" /></view>
</picker>
</view>
</view>
<!-- 行政区划和项目类型下拉框 -->
<view class="cc-query-dropdowns dropdowns">
<picker mode="selector" :range="districts" v-model="selectedDistrict">
<view class="dropdown">检查日期<image src="/static/images/icon/down.png" /></view>
</picker>
<picker mode="selector" :range="projectTypes" v-model="selectedProjectType">
<view class="dropdown">检查类型<image src="/static/images/icon/down.png" /></view>
</picker>
</view>
<!-- 项目列表 -->
<view class="project-list">
<view v-for="(project, index) in filteredProjects" :key="index" class="project-card">
<view class="attr-item project-title">{{ project.name }}</view>
<view class="cc-project-list">
<view v-for="(project, index) in problemList" :key="index" class="project-card">
<view class="attr-item project-title">{{ projectName }}</view>
<view class="attr-item">
<view class="attr-title">检查日期</view>
<view class="attr-value">{{ project.code }}</view>
<view class="attr-value">{{ project.inspectionDate }}</view>
</view>
<view class="attr-item">
<view class="attr-title">检查单位</view>
<view class="attr-value">{{ project.district }}</view>
<view class="attr-value">{{ project.inspectionUnit }}</view>
</view>
<view class="attr-item">
<view class="attr-title">被检查单位</view>
<view class="attr-value">{{ project.type }}</view>
<view class="attr-value">{{ project.inspectionPerson }}</view>
</view>
<view class="attr-item">
<view class="attr-title">检查类型</view>
<view class="attr-value">{{ project.code }}</view>
<view class="attr-value">{{ project.menuTypeName }}</view>
</view>
<view class="attr-item">
<view class="attr-title">发现问题数</view>
<view class="attr-value">{{ project.district }}</view>
<view class="attr-value">{{ project.problemTotal }}</view>
</view>
<view class="attr-item">
<view class="attr-title">未整改问题数</view>
<view class="attr-value">{{ project.type }}</view>
<view class="attr-value">{{ project.notRectifiedNum }}</view>
</view>
<view class="operate-buttons">
<view class="buttons-group">
@ -56,17 +59,25 @@
</view>
</view>
<no-data-view v-if="problemList.length === 0" />
<uni-load-more v-if="queryParams.pageNum == pages" status="no-more"></uni-load-more>
<!-- 操作按钮 -->
<view v-if="activeTab===0" class="operation-buttons">
<view class="buttons-group">
<view class="primary-button button" @click="handleAddProblem()">新增问题</view>
<view class="primary-button button" @click="handleAddCheck()">新增问题</view>
</view>
</view>
</view>
</template>
<script>
import { projectCheckListApi } from '@/api/system/project'
import NoDataView from '@/components/no-data-view/no-data-view.vue'
export default {
components: {
NoDataView
},
data() {
return {
activeTab: 0, // Tab
@ -75,42 +86,128 @@ export default {
selectedProjectType: 0, //
districts: ['请选择', '北京市', '上海市', '广州市'], //
projectTypes: ['请选择', '建筑', 'IT', '教育'], //
projects: [ //
{ name: '项目1', code: 'P001', district: '北京市', type: '建筑', status: 1 },
{ name: '项目2', code: 'P002', district: '上海市', type: 'IT', status: 0},
{ name: '项目3', code: 'P003', district: '广州市', type: '教育', status: 1},
{ name: '项目4', code: 'P004', district: '北京市', type: '建筑', status: 1}
]
queryParams: {
pageNum: 1,
pageSize: 10,
params: {orderBy: "create_time", sortBy: "desc"},
data: {
proNo: this.$route.query.id,
projectName: this.$route.query.projectName,
menuType: '0',
checkType: '',
checkTime: ''
}
},
proNo: this.$route.query.id,
proCode: this.$route.query.proCode,
projectName: this.$route.query.projectName,
projects: [],
problemList: [],
pages: 0,
checkTypes: [],
checkTypeNames: []
};
},
computed: {
filteredProjects() {
return this.projects.filter(project => {
//
const matchesSearch = project.name.toLowerCase().includes(this.searchQuery.toLowerCase());
const matchesDistrict = this.selectedDistrict === 0 || project.district === this.districts[this.selectedDistrict];
const matchesType = this.selectedProjectType === 0 || project.type === this.projectTypes[this.selectedProjectType];
return matchesSearch && matchesDistrict && matchesType;
});
}
created() {
this.getDicts("check_type").then((response) =>{
this.checkTypes = response.data
this.checkTypeNames = this.checkTypes.map(item => item.dictLabel)
})
this.getProjectCheckList()
},
// onReachBottom() {
// if (this.queryParams.pageNum < this.pages) {
// this.queryParams.pageNum++; // 1
// this.getProjectCheckList()
// }
// },
methods: {
changeTab(index) {
this.activeTab = index;
this.activeTab = index
this.queryParams.pageNum = 1
this.getProjectCheckList('again')
},
handleAddProject() {
//
this.$tab.navigateTo(`/pages/project/edit/index`)
//
getProjectCheckList(mode) {
uni.showLoading({
title: '加载中...',
mask: true
})
projectCheckListApi(this.queryParams).then(res => {
if (mode === 'again') {
this.projectCheckList = []
uni.pageScrollTo({
scrollTop: 0, //
duration: 300 //
})
}
this.problemList = res.records[0].bsSgcJsjdBuiRegulatoryInspections
this.problemList.forEach(item => {
this.menuTypeName = this.formatMenuType(item)
})
// this.projectCheckList = [...this.projectCheckList, ...res.records]
// this.pages = res.pages
// this.projectCheckList.forEach(projectItem => {
// projectItem.adcdName = this.formatAdcd(projectItem)
// })
uni.hideLoading()
})
},
//
checkTypesFormat(row, column) {
return this.selectDictLabel(
this.checkTypes,
row.checkType
);
},
handleEditProblem() {
formatMenuType(row) {
let res;
switch (row?.menuType) {
case "0":
res = "项目法人履职检查";
break;
case "1":
res = "质量检查";
break;
case "2":
res = "市场监督专项检查";
break;
case "3":
res = "防洪度汛检查";
break;
default:
break;
}
return res;
},
handleSearchProjectList() {
this.searchQuery = ''
this.queryParams.pageNum = 1
this.getProjectCheckList('again')
},
handleDateChange(e) {
this.queryParams.inspectionDate = e.detail.value
},
handleCheckTypeChange(e) {
this.queryParams.checkType = this.checkTypes[e.detail.value]
},
handleEditProblem(item) {
//
this.$tab.navigateTo(`/pages/monitoring/problem/edit`)
this.$tab.navigateTo(`/pages/monitoring/problem/edit?proNo=${this.proNo}&proCode=${this.proCode}&monitorId=${item.id}`)
},
handleAddProblem() {
this.$tab.navigateTo(`/pages/monitoring/problem/add`)
handleAddProblem(item) {
this.$tab.navigateTo(`/pages/monitoring/problem/add?proNo=${this.proNo}&proCode=${this.proCode}&menuType=${0}&projectName=${this.projectName}&inspectionId=${item.id}`)
},
handleDeleteCheck() {
},
handleAddCheck() {
this.$tab.navigateTo(`/pages/monitoring/problem/edit?proNo=${this.proNo}&proCode=${this.proCode}&menuType=${0}&projectName=${this.projectName}`)
}
}
};

126
jwtech-h5-page/pages/statistics/generate.vue

@ -1,9 +1,11 @@
<template>
<view class="report">
<!-- Tabs -->
<view class="cc-tabs tabs">
<view class="tab" :class="{ active: currentTab === 0 }" @click="switchTab(0)"><view class="tab-text">报告生成</view></view>
<view class="tab" :class="{ active: currentTab === 1 }" @click="switchTab(1)"><view class="tab-text">报告记录</view></view>
<view class="cc-header">
<!-- Tabs -->
<view class="cc-tabs tabs">
<view class="tab" :class="{ active: currentTab === 0 }" @click="switchTab(0)"><view class="tab-text">报告生成</view></view>
<view class="tab" :class="{ active: currentTab === 1 }" @click="switchTab(1)"><view class="tab-text">报告记录</view></view>
</view>
</view>
<!-- 报告生成 Tab 内容 -->
@ -17,7 +19,7 @@
<!-- 复选框列表 -->
<view class="checkbox-list">
<uni-data-checkbox multiple v-model="selectedItems" :localdata="checkboxItems" @change="change"></uni-data-checkbox>
<uni-data-checkbox multiple v-model="selectedItems" :localdata="checkboxItems"></uni-data-checkbox>
</view>
</view>
@ -44,7 +46,7 @@
</view>
</view>
</view> -->
<view v-if="currentTab === 1" class="cc-project-list">
<view v-if="currentTab === 1" class="cc-project-list" style="padding: 48px 20px 20px;">
<view v-for="(report, index) in reportRecords" :key="index" class="project-card">
<view class="attr-item project-title">{{ report.name }}</view>
<view class="attr-item">
@ -66,7 +68,7 @@
<view class="popup-title">已选项{{ selectedItems.length }}</view>
<view class="popup-list">
<view class="checkbox-list">
<uni-data-checkbox multiple v-model="selectedItems" :localdata="checkboxItems" @change="change"></uni-data-checkbox>
<uni-data-checkbox multiple v-model="selectedItems" :localdata="checkboxItems"></uni-data-checkbox>
</view>
</view>
<view class="popup-footer">
@ -78,21 +80,43 @@
<!-- 推送弹窗 -->
<view v-if="showPushPopup" class="popup">
<!-- <view class="popup-content">
<text class="popup-title">选择推送项</text>
<view class="checkbox-list">
<uni-data-checkbox multiple v-model="selectedItems" :localdata="checkboxItems" @change="change"></uni-data-checkbox>
<view class="popup-content">
<view class="popup-title">已选项{{ selectedPeoples.length }}</view>
<view class="popup-list">
<view class="checkbox-list">
<uni-data-checkbox multiple v-model="selectedPeoples" :localdata="peopleCheckboxItems"></uni-data-checkbox>
</view>
</view>
<view class="popup-footer">
<view class="cc-btn cc-default-btn" @click="closePushPopup">取消</view>
<view class="cc-btn cc-primary-btn" @click="confirmPush">确定</view>
</view>
</view>
</view>
<!-- 提示信息弹窗 -->
<uni-popup ref="popup" background-color="#fff">
<view class="popup-content">
<view class="popup-title">已选项{{ selectedItems.length }}</view>
<view class="popup-list">
<view class="checkbox-list">
<uni-data-checkbox multiple v-model="selectedItems" :localdata="checkboxItems"></uni-data-checkbox>
</view>
</view>
<view class="popup-actions">
<button class="cancel-btn" @click="closePushPopup">取消</button>
<button class="confirm-btn" @click="confirmPush">确定</button>
<view class="popup-footer">
<view class="cc-btn cc-default-btn" @click="closePopup">取消</view>
<view class="cc-btn cc-primary-btn" @click="confirmGenerate">确定</view>
</view>
</view> -->
</view>
</uni-popup>
<!-- 提示信息弹窗 -->
<uni-popup ref="pushPopup" background-color="#fff">
<view class="popup-content">
<view class="popup-title">已选项{{ selectedPeoples.length }}</view>
<view class="popup-list">
<view class="checkbox-list">
<uni-data-checkbox multiple v-model="selectedPeoples" :localdata="peopleCheckboxItems" @change="change"></uni-data-checkbox>
<uni-data-checkbox multiple v-model="selectedPeoples" :localdata="peopleCheckboxItems"></uni-data-checkbox>
</view>
</view>
<view class="popup-footer">
@ -100,13 +124,11 @@
<view class="cc-btn cc-primary-btn" @click="confirmPush">确定</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
// import { UniCard, UniCheckbox, UniCheckboxGroup } from '@dcloudio/uni-ui';
export default {
// components: {
// UniCard,
@ -166,11 +188,19 @@ export default {
},
//
showSelectedItems() {
this.showPopup = true;
// this.showPopup = true;
this.$refs.popup.open('bottom')
},
//
closePopup() {
this.showPopup = false;
this.$refs.popup.close()
},
confirmGenerate() {
uni.showToast({
title: `生成报告`,
icon: 'none'
})
this.$refs.popup.close()
},
//
viewReport(report) {
@ -181,11 +211,13 @@ export default {
},
//
pushReport(report) {
this.showPushPopup = true;
this.$refs.pushPopup.open('bottom')
// this.showPushPopup = true;
},
//
closePushPopup() {
this.showPushPopup = false;
// this.showPushPopup = false;
this.$refs.pushPopup.close()
},
//
confirmPush() {
@ -193,7 +225,8 @@ export default {
title: `推送报告成功`,
icon: 'none'
});
this.showPushPopup = false;
// this.showPushPopup = false;
this.$refs.pushPopup.close()
}
}
};
@ -205,7 +238,7 @@ export default {
flex-direction: column;
height: 100%;
.report-generation {
padding: 16px 20px;
padding: 64px 20px 20px;
::v-deep {
.uni-card {
border-radius: 8px;
@ -347,6 +380,45 @@ export default {
}
}
.uni-popup {
.uni-popup__wrapper {
display: none !important;
}
uni-view[name="content"] {
display: none !important;
}
.popup-content {
width: 100%;
background-color: white;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
border-radius: 8px 8px 0 0;
.popup-title {
font-size: 18px;
color: #262626;
padding: 15px 20px;
margin-bottom: 10px;
border-bottom: 1px solid #f0f0f0;
}
.popup-list {
padding: 0 20px;
margin-bottom: 20px;
.checkbox-list {
padding: 0;
}
}
.popup-footer {
display: flex;
padding: 15px 20px;
.cc-btn {
flex: 1;
&:nth-child(1) {
margin-right: 10px;
}
}
}
}
}
.popup-item {
font-size: 16px;
color: #333;
@ -361,8 +433,4 @@ export default {
border-radius: 4px;
width: 100%;
}
// .popup[style*="transform: translateY(0)"] {
// transform: translateY(0);
// }
</style>

275
jwtech-h5-page/pages/statistics/index.vue

@ -131,7 +131,9 @@ export default {
ms_projectTypeOptions: [],
zdTotal: 0,
msTotal: 0,
cityData: {}
cityData: {},
newAddressList:[],
warningData: {}
}
},
//
@ -149,8 +151,7 @@ export default {
this.getProjectCategoryData()
this.getProjectTypeData()
this.getProjectCityData()
// this.getProjectWarningData()
this.initWarningChart();
this.getProjectWarningData()
},
methods: {
//
@ -203,7 +204,6 @@ export default {
this.projectType.push(obj);
});
this.total = Number(this.acc["acc"]) + Number(this.acc["noAcc"]);
console.log(this.projectType);
this.initTypeChart(this.projectType)
this.initStatusChart()
})
@ -227,8 +227,8 @@ export default {
//
getProjectWarningData() {
getWarningNumApi().then(res => {
this.sourceFound = res.data
this.adcd = Object.keys(this.sourceFound)
this.warningData = res.data
this.initWarningChart()
})
},
@ -244,26 +244,27 @@ export default {
}
this.addressTreeList.forEach(node => traverse(node)); //
this.addressList = result
this.addressList.forEach(item => {
this.newAddressList = JSON.parse(JSON.stringify(this.addressList))
this.newAddressList.forEach(item => {
if (item.code.length===2) {
item.code = item.dictValue = item.code + '0000'
item.code = item.code + '0000'
}
if (item.code.length===4) {
item.code = item.dictValue = item.code + '00'
item.code = item.code + '00'
}
})
},
barInit() {
let keys = Object.keys(this.sourceFound)
for (let i=0; i<keys.length; i++) {
if (keys[i].length===2) {
keys[i] += "0000"
}
if (keys[i].length===4) {
keys[i] += "00"
}
}
// for (let i=0; i<keys.length; i++) {
// if (keys[i].length===2) {
// keys[i] += "0000"
// }
// if (keys[i].length===4) {
// keys[i] += "00"
// }
// }
//
const cityMap = new Map(this.addressList.map(city => [city.code, city]));
let filteredData = keys
@ -469,6 +470,7 @@ export default {
...item,
// name: this.truncateName(item.name),
}));
let legendList = chartData.map(item => item.name)
// const data = [
// {
// value: 2088,
@ -521,17 +523,19 @@ export default {
// },
// ]
//
const total = data.reduce((sum, item) => sum + item.value, 0);
const total = data.reduce((sum, item) => sum + item.value, 0)
const option = {
tooltip: {
trigger: 'item',
show: false, // 线
show: true, // 线
},
color: ['#00b39d', '#0073ee', '#00a7ee', '#00b368', '#ecb800', '#ec7000', '#e04040'],
legend: {
orient: 'vertical',
right: '5%', //
top: '15%', //
data: ['饮水工程', '枢纽工程', '新建水库', '病险', '灌区', '水保', '其他'],
// data: ['', '', '', '', '', '', ''],
data: legendList,
itemWidth: 12, //
itemHeight: 12, //
itemStyle: {
@ -546,8 +550,8 @@ export default {
{
name: '项目类别',
type: 'pie',
center: ['32%', '50%'], //
radius: ['80%', '60%'], //
center: ['35%', '50%'], //
radius: ['70%', '50%'], //
// avoidLabelOverlap: false,
itemStyle: {
borderRadius: 0,
@ -574,41 +578,41 @@ export default {
},
}
],
// graphic: [
// {
// type: 'text',
// top: '40%',
// left: '28%',
// style: {
// text: '', //
// font: '16px Microsoft YaHei', //
// fill: '#333' //
// },
// // 使
// // textAlign: 'center',
// // textVerticalAlign: 'middle'
// },
// {
// type: 'text',
// top: '53%',
// left: '24%',
// style: {
// text: total, //
// font: 'bold 24px Microsoft YaHei', //
// fill: '#262626' //
// },
// // 使
// // textAlign: 'center',
// // textVerticalAlign: 'middle'
// // 使
// // silent: true,
// // top: 'center', // 使
// // style: {
// // textAlign: 'center',
// // textVerticalAlign: 'middle',
// // }
// }
// ]
graphic: [
{
type: 'text',
top: '40%',
left: '30%',
style: {
text: '合计', //
font: '16px Microsoft YaHei', //
fill: '#333' //
},
// 使
// textAlign: 'center',
// textVerticalAlign: 'middle'
},
{
type: 'text',
top: '53%',
left: '30%',
style: {
text: total, //
font: 'bold 24px Microsoft YaHei', //
fill: '#262626' //
},
// 使
// textAlign: 'center',
// textVerticalAlign: 'middle'
// 使
// silent: true,
// top: 'center', // 使
// style: {
// textAlign: 'center',
// textVerticalAlign: 'middle',
// }
}
]
};
this.typeChartOption = option;
@ -634,7 +638,7 @@ export default {
}
]
//
const total = data.reduce((sum, item) => sum + item.value, 0);
const total = Number(this.acc.noAcc) + Number(this.acc.acc)
const option = {
tooltip: {
trigger: 'item',
@ -719,14 +723,14 @@ export default {
//
initDistrictChart() {
let keys = Object.keys(this.cityData)
let keys = Object.keys(this.cityData)
//
const cityMap = new Map(this.addressList.map(city => [city.code, city]));
const cityMap = new Map(this.newAddressList.map(city => [city.code, city]));
let filteredData = keys
.filter(key => cityMap.has(key)) //
.map(key => ({ name: cityMap.get(key).name, value: this.cityData[key] })) //
console.log(filteredData)
let legendList = filteredData.map(item => item.name )
let data = filteredData
// const data = [
// {
// value: 2088,
@ -783,13 +787,37 @@ export default {
const option = {
tooltip: {
trigger: 'item',
show: false, // 线
show: true, // 线
},
color: ['#00b39d', '#0073ee', '#00a7ee', '#00b368', '#ecb800', '#ec7000', '#e04040',
"#FF5733", //
"#33FF57", // 绿
"#3357FF", //
"#F1C40F", //
"#8E44AD", //
"#E67E22", //
"#2ECC71", // 绿
"#3498DB", //
"#9B59B6", //
"#34495E", //
"#1ABC9C", //
"#D35400", //
"#C0392B", //
"#F39C12", //
"#7D3C98", //
"#2980B9", //
"#27AE60", // 绿
"#8E44AD", //
"#F4D03F", //
"#BDC3C7" //
],
legend: {
type: 'scroll',
orient: 'vertical',
right: '5%', //
top: '15%', //
data: ['饮水工程', '枢纽工程', '新建水库', '病险', '灌区', '水保', '其他'],
// data: ['', '', '', '', '', '', ''],
data: legendList,
itemWidth: 12, //
itemHeight: 12, //
itemStyle: {
@ -804,8 +832,8 @@ export default {
{
name: '项目类别',
type: 'pie',
center: ['32%', '50%'], //
radius: ['80%', '60%'], //
center: ['35%', '50%'], //
radius: ['70%', '50%'], //
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 0,
@ -836,7 +864,7 @@ export default {
{
type: 'text',
top: '40%',
left: '28%',
left: '29%',
style: {
text: '合计', //
font: '16px Microsoft YaHei', //
@ -849,7 +877,7 @@ export default {
{
type: 'text',
top: '53%',
left: '24%',
left: '28%',
style: {
text: total, //
font: 'bold 24px Microsoft YaHei', //
@ -874,70 +902,93 @@ export default {
//
initWarningChart() {
// const chart = echarts.init(document.getElementById('warningChart'));
const data = [
{
value: 2088,
name: '饮水工程',
name: '预警',
value: this.warningData.warn,
itemStyle: {
color: '#00b39d',
},
}
},
{
value: 1000,
name: '枢纽工程',
name: '提醒',
value: this.warningData.forewarning,
itemStyle: {
color: '#0073ee',
},
}
},
{
value: 1000,
name: '新建水库',
name: '正常',
value: this.warningData.normal,
itemStyle: {
color: '#00a7ee',
},
},
{
value: 800,
name: '病险',
itemStyle: {
color: '#00b368',
},
},
{
value: 1000,
name: '灌区',
itemStyle: {
color: '#ecb800',
},
},
{
value: 350,
name: '水保',
itemStyle: {
color: '#ec7000',
},
},
{
value: 350,
name: '其他',
itemStyle: {
color: '#e04040',
},
}
},
]
// const data = [
// {
// value: 2088,
// name: '',
// itemStyle: {
// color: '#00b39d',
// },
// },
// {
// value: 1000,
// name: '',
// itemStyle: {
// color: '#0073ee',
// },
// },
// {
// value: 1000,
// name: '',
// itemStyle: {
// color: '#00a7ee',
// },
// },
// {
// value: 800,
// name: '',
// itemStyle: {
// color: '#00b368',
// },
// },
// {
// value: 1000,
// name: '',
// itemStyle: {
// color: '#ecb800',
// },
// },
// {
// value: 350,
// name: '',
// itemStyle: {
// color: '#ec7000',
// },
// },
// {
// value: 350,
// name: '',
// itemStyle: {
// color: '#e04040',
// },
// },
// ]
//
const total = data.reduce((sum, item) => sum + item.value, 0);
const option = {
tooltip: {
trigger: 'item',
show: false, // 线
show: true, // 线
},
legend: {
type: 'scroll',
orient: 'vertical',
right: '5%', //
top: '15%', //
data: ['饮水工程', '枢纽工程', '新建水库', '病险', '灌区', '水保', '其他'],
data: ['预警', '提醒', '正常'],
itemWidth: 12, //
itemHeight: 12, //
itemStyle: {
@ -952,8 +1003,8 @@ export default {
{
name: '项目类别',
type: 'pie',
center: ['32%', '50%'], //
radius: ['80%', '60%'], //
center: ['35%', '50%'], //
radius: ['70%', '50%'], //
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 0,
@ -984,7 +1035,7 @@ export default {
{
type: 'text',
top: '40%',
left: '28%',
left: '29%',
style: {
text: '合计', //
font: '16px Microsoft YaHei', //
@ -997,7 +1048,7 @@ export default {
{
type: 'text',
top: '53%',
left: '24%',
left: '27%',
style: {
text: total, //
font: 'bold 24px Microsoft YaHei', //

4
jwtech-h5-page/static/scss/common.scss

@ -269,7 +269,7 @@
margin-top: 10px;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
margin-top: 15px;
margin-top: 16px;
.attr-item {
display: flex;
align-items: center;
@ -368,7 +368,7 @@
padding-bottom: 16px;
}
.form-tips {
font-size: 16px;
font-size: 14px;
color: #8C8C8C;
margin-top: 5px;
}

Loading…
Cancel
Save