From 24a04767b281739056ed0658bb956fccbe84cb1d Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Thu, 01 Feb 2024 18:11:41 +0800
Subject: [PATCH] 更新
---
pages/user/test.vue | 100 ++-
subPackage/house/roomDetails/detail.vue | 12
subPackage/workbench/views/checkReform3.vue | 463 ++++++++++++++++++
subPackage/workbench/views/checkReform.vue | 585 +++++++---------------
api/place/place.js | 10
subPackage/house/houseNumber/index.vue | 12
subPackage/workbench/views/cscj.vue | 103 +++-
api/system/dict.js | 7
subPackage/workbench/views/audit.vue | 2
subPackage/house/houseNumber/siteInspect.vue | 186 ++++--
10 files changed, 953 insertions(+), 527 deletions(-)
diff --git a/api/place/place.js b/api/place/place.js
index efdd24f..be271a0 100644
--- a/api/place/place.js
+++ b/api/place/place.js
@@ -59,10 +59,20 @@
})
}
+//获取消防检查项
export const getPlaceCheckItem = (params) => {
return http.request({
url: '/patrol/patrolGroup/getPatrolGroupTree',
method: 'GET',
params
})
+}
+
+//获取场所整改详情
+export const getPlaceCheckReformDetail = (params) => {
+ return http.request({
+ url: '/blade-taskPlaceRectification/taskPlaceRectification/detailByTaskId',
+ method: 'GET',
+ params
+ })
}
\ No newline at end of file
diff --git a/api/system/dict.js b/api/system/dict.js
index 9460dc5..72d10f8 100644
--- a/api/system/dict.js
+++ b/api/system/dict.js
@@ -17,6 +17,13 @@
})
}
+export const bizDictionaryTree = (params) => {
+ return http.request({
+ url: '/blade-system/dict-biz/tree',
+ method: 'GET',
+ params
+ })
+}
export const parentList = (params) => {
return http.request({
diff --git a/pages/user/test.vue b/pages/user/test.vue
index decd9b0..1eff747 100644
--- a/pages/user/test.vue
+++ b/pages/user/test.vue
@@ -4,12 +4,11 @@
<text class="f-28">选择标签</text>
<u-icon name="arrow-right"></u-icon>
</view>
- <view class="mt-20 p-20 bgc-ff" v-if="selectedItem.length">
+ <view class="mt-20 p-20 bgc-ff" v-if="selectedCate">
<view class="f-28">已选标签</view>
<view class="p-20 flex flex-wrap">
- <view v-for="(item,index) in selectedItem" :key="index" class="mr-20">
- <u-tag :closable="true" size="mini" @close="delTag(index)"
- :text="item.categoryName"></u-tag>
+ <view class="mr-20">
+ <u-tag size="mini" :text="selectedCate"></u-tag>
</view>
</view>
</view>
@@ -18,37 +17,42 @@
- <u-popup :show="isShow" @close="closePopup" :safeAreaInsetTop="true" mode="bottom" :closeable="true"
- round="12">
- <view class="popup-title fw f-30">标签选择</view>
+ <u-popup :show="isShow" @close="closePopup" :safeAreaInsetTop="true" mode="bottom" :closeable="true" round="12">
+ <view class="popup-title fw f-30">九小场所类型</view>
<view class="popup-list flex a-i-c">
<scroll-view scroll-y="true" class="scroll">
<view class="popup-box">
- <view :class="['box-item','f-28',index == fIndex?'c-main fw':'']"
+ <view :class="['box-item','f-28',item.id == selectedFId?'c-main fw':'']"
v-for="(item,index) in categoryList" :key="index" @click="handleSelect(item,index)">
- {{item.categoryName}}
+ {{item.title}}
</view>
</view>
</scroll-view>
<u-line direction="col" length="300rpx" v-if="childList.length"></u-line>
<scroll-view scroll-y="true" class="scroll" v-if="childList.length">
<view class="popup-box">
- <view :class="['box-item','f-28',item.isSelect?'c-main fw':'']"
+ <!-- <view :class="['box-item','f-28',item.isSelect?'c-main fw':'']"
v-for="(item,index) in childList" :key="index" @click="handleSelectChild(item,index)">
- {{item.categoryName}}
+ {{item.title}}
+ </view> -->
+
+ <view :class="['box-item','f-28',item.id == selectedCId?'c-main fw':'']"
+ v-for="(item,index) in childList" :key="index" @click="handleSelectChild(item,index)">
+ {{item.title}}
</view>
+
</view>
</scroll-view>
</view>
- <!-- <view class="popup-footer flex j-c-s-b a-i-c">
- <view class="popup-btn c-main" @click="closePopup">
+ <view class="popup-footer flex j-c-s-b a-i-c">
+ <view class="popup-btn c-main" @click="closePopup">
取消
</view>
<view class="popup-btn bgc-main c-ff">
确定
</view>
- </view> -->
+ </view>
</u-popup>
</view>
@@ -58,6 +62,10 @@
import {
getLabelCate
} from "@/api/label/categoryLabel.js";
+ import {
+ bizDictionary,
+ bizDictionaryTree
+ } from '@/api/system/dict.js'
export default {
data() {
return {
@@ -67,15 +75,31 @@
fIndex: null,
cId: null,
showLabelList: [],
- selectedItem: []
+ selectedItem: [],
+ selectedCate: "",
+ selectedFId: "",
+ selectedCId: "",
+ selectedId: ""
}
},
onLoad() {
- this.getCategory(1);
+ // this.getCategory(1);
+ this.getNineTypeList()
},
methods: {
+
+ getNineTypeList() {
+ bizDictionaryTree({
+ code: "nineType"
+ }).then(res => {
+ console.log(res.data);
+ this.categoryList = res.data;
+ })
+ },
+
+
getCategory(level, id) {
let params = {
level
@@ -101,13 +125,22 @@
handleSelect(item, index) {
if (index == this.fIndex) return;
this.fIndex = index;
- this.selectedItem = [item];
- this.getCategory(2, item.categoryNo);
- console.table( "选择父级=>",this.selectedItem)
+ this.selectedCate = item.title;
+ this.selectedFId = item.id;
+ if (item.hasChildren) {
+ this.childList = item.children;
+
+ } else {
+ this.childList = [];
+ }
+ // this.getCategory(2, item.categoryNo);
+ console.table("选择父级=>", this.selectedItem)
},
handleSelectChild(item, index) {
- this.childList[index].isSelect = !this.childList[index].isSelect;
- this.getSelected()
+ // this.childList[index].isSelect = !this.childList[index].isSelect;
+ this.selectedCate = item.title;
+ this.selectedCId = item.id;
+ // this.getSelected()
},
@@ -119,7 +152,7 @@
}
}
this.selectedItem = arr;
- console.table("选择子级=>",this.selectedItem);
+ console.table("选择子级=>", this.selectedItem);
},
showSelected() {
@@ -131,14 +164,14 @@
}
}
},
-
-
- closePopup(){
+
+
+ closePopup() {
this.isShow = false;
},
-
- delTag(index){
- this.selectedItem.splice(index,1);
+
+ delTag(index) {
+ this.selectedItem.splice(index, 1);
}
@@ -178,16 +211,17 @@
// .scroll:last-child {
// flex:2;
// }
- .p-20{
- padding:20rpx;
+ .p-20 {
+ padding: 20rpx;
}
-
+
.popup-list {
width: 100%;
height: 700rpx;
- padding:10rpx 0;
+ padding: 10rpx 0;
box-sizing: border-box;
+
.bgc-f4 {
background-color: #f4f4f4;
}
@@ -222,6 +256,4 @@
border: 1px solid currentColor;
}
}
-
-
</style>
\ No newline at end of file
diff --git a/subPackage/house/houseNumber/index.vue b/subPackage/house/houseNumber/index.vue
index 8a09ad3..fd1fd7e 100644
--- a/subPackage/house/houseNumber/index.vue
+++ b/subPackage/house/houseNumber/index.vue
@@ -179,7 +179,7 @@
},
{
title: '阵地',
- name: 'isFrontType',
+ name: 'isFront',
value: '未完善'
},
{
@@ -196,6 +196,11 @@
{
title: '手机号',
name: 'phone',
+ value: '未完善'
+ },
+ {
+ title: '身份证号',
+ name: 'principalIdCard',
value: '未完善'
},
{
@@ -341,7 +346,8 @@
console.log("oload=>", option)
this.stdId = option.stdId
- if (uni.getStorageSync("activeRole").roleName == "民警") {
+ if (uni.getStorageSync("activeRole").roleName == "民警" || uni.getStorageSync("activeRole").roleName ==
+ "系统管理员") {
this.isPolice = true;
}
if (option.addressType) {
@@ -577,7 +583,7 @@
navToInspect() {
uni.navigateTo({
- url: `siteInspect?code=${this.stdId}`
+ url: `/subPackage/house/houseNumber/siteInspect?code=${this.stdId}`
})
}
diff --git a/subPackage/house/houseNumber/siteInspect.vue b/subPackage/house/houseNumber/siteInspect.vue
index 925cba6..3af8ba9 100644
--- a/subPackage/house/houseNumber/siteInspect.vue
+++ b/subPackage/house/houseNumber/siteInspect.vue
@@ -1,46 +1,50 @@
<template>
<view class="wrap">
- <u-collapse :value="itemIndex" ref="collapse">
- <u-collapse-item :title="item.title" :name="index" v-for="(item,index) in questionList">
- <u-form :model="info" ref="form">
- <block v-for="(i,k) in item.children">
- <view class="f-30 c-33">
- {{i.title}}
- </view>
- <u-form-item labelWidth="90" label="隐患" prop="gateStatus">
- <view class="btn-group flex">
- <view class="value-item" :class="i.state == 0?'active bgc-main c-ff':''"
- @click="changeStatus(0,i,index,k)">
- 存在
- </view>
- <view class="value-item" :class="i.state == 1?'active bgc-main c-ff':''"
- @click="changeStatus(1,i,index,k)">
- 不存在
- </view>
+ <view class="section mb-20">
+ <u-collapse :value="itemIndex" ref="collapse">
+ <u-collapse-item :title="item.title" :name="index" v-for="(item,index) in questionList">
+ <u-form :model="info" ref="form">
+ <block v-for="(i,k) in item.children">
+ <view class="f-30 c-33">
+ {{i.title}}
</view>
- </u-form-item>
- <view class="" v-if="i.state == 0">
- <u-form-item labelWidth="100" label="隐患照片" prop="gateStatus">
- <u-upload :fileList="i.urls" :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
- :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
- @afterRead="afterReadImgs($event,i,index,k)" @delete="deleteImages($event,index,k)">
- <view class="upload-item upload-icon flex_base">
- <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
+ <u-form-item labelWidth="90" label="隐患" prop="gateStatus">
+ <view class="btn-group flex">
+ <view class="value-item" :class="i.state == 0?'active bgc-main c-ff':''"
+ @click="changeStatus(0,i,index,k)">
+ 存在
</view>
- </u-upload>
+ <view class="value-item" :class="i.state == 1?'active bgc-main c-ff':''"
+ @click="changeStatus(1,i,index,k)">
+ 不存在
+ </view>
+ </view>
</u-form-item>
- <u-form-item labelWidth="100" label="隐患描述" prop="gateStatus">
- <u-textarea v-model="i.remark" placeholder="请输入隐患描述"
- placeholderClass="c-99 f-26"></u-textarea>
- </u-form-item>
- </view>
- </block>
- </u-form>
- </u-collapse-item>
- </u-collapse>
+ <view class="" v-if="i.state == 0">
+ <u-form-item labelWidth="100" label="隐患照片" prop="gateStatus">
+ <u-upload :fileList="i.urls" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
+ :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
+ @afterRead="afterReadImgs($event,i,index,k)"
+ @delete="deleteImages($event,index,k)">
+ <view class="upload-item upload-icon flex_base">
+ <u-icon name="/static/icon/upload.png" width="60rpx"
+ height="60rpx"></u-icon>
+ </view>
+ </u-upload>
+ </u-form-item>
+ <u-form-item labelWidth="100" label="隐患描述" prop="gateStatus">
+ <u-textarea v-model="i.remark" placeholder="请输入隐患描述"
+ placeholderClass="c-99 f-26"></u-textarea>
+ </u-form-item>
+ </view>
+ </block>
+ </u-form>
+ </u-collapse-item>
+ </u-collapse>
+ </view>
- <view class="content">
+ <view class="content bgc-ff">
<view class="upload ">
<view class="f-28 mb-20">其它隐患问题</view>
<u-textarea v-model="info.remark" placeholder="请输入内容" placeholderClass="c-99 f-26"></u-textarea>
@@ -63,31 +67,50 @@
<view v-if="signatureUrl">
<u-image :src="signatureUrl" width="70" height="70" @click="previewImg()"></u-image>
</view>
-
- <!-- <view class="flex j-c-s-b a-i-c mt-20 mb-20">
- <view class="f-28">下发责令整改通知</view>
- <view class="flex j-c-f-e">
- <u-radio-group>
- <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" :key="index"
- :label="item.name" :name="item.id">
- </u-radio>
- </u-radio-group>
- </view>
-
- </view>
- <view class="flex j-c-s-b a-i-c ">
- <view class="f-28">处罚</view>
- <view class="flex j-c-f-e">
- <u-radio-group v-if="!currentId">
- <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" :key="index"
- :label="item.name" :name="item.id">
- </u-radio>
- </u-radio-group>
- </view>
- </view> -->
</view>
+ <view class="cell bgc-ff" v-if="dangerCount > 0">
+ <view class="flex j-c-s-b a-i-c mt-20 mb-20">
+ <view class="f-28">下发责令整改通知</view>
+ <view class="flex j-c-f-e">
+ <u-radio-group v-model="info.rectificationNoticeFlag">
+ <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" :key="index"
+ :label="item.name" :name="item.id">
+ </u-radio>
+ </u-radio-group>
+ </view>
+ </view>
+ <view class="flex j-c-s-b a-i-c mb-20">
+ <view class="f-28">处罚</view>
+ <view class="flex j-c-f-e">
+ <u-radio-group v-model="info.punishFlag">
+ <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" :key="index"
+ :label="item.name" :name="item.id">
+ </u-radio>
+ </u-radio-group>
+ </view>
+ </view>
+
+ <view class="flex j-c-s-b a-i-c mb-20" v-if="info.punishFlag == 1">
+ <view class="f-28" style="width:160rpx;">处罚说明</view>
+ <u-textarea v-model="info.punishRemark" placeholder="请输入处罚说明内容"
+ placeholderClass="c-99 f-26"></u-textarea>
+ </view>
+
+ <view class="flex j-c-s-b a-i-c" @click="showSelectDate = true">
+ <view class="f-28">整改截止时间</view>
+ <view class="flex a-i-c">
+ <text class="mr-10">{{info.rectificationEndTime}}</text>
+ <u-icon name="arrow-right"></u-icon>
+ </view>
+ </view>
+ </view>
+
+
<footer-btn @click="sumitInfo"></footer-btn>
+
+ <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="time" mode="datetime"
+ :formatter="formatter" @confirm="confirmDate" @cancel="showSelectDate = false"></u-datetime-picker>
<u-popup mode="bottom" :show="showSignature" round="10" :closeable="true" @close="showSignature=false">
<view class="signture-popup">
@@ -95,6 +118,7 @@
</view>
</u-popup>
+ <view class="blank"></view>
</view>
</template>
@@ -115,6 +139,10 @@
remark: "",
imageUrls: "",
signaturePath: "",
+ rectificationNoticeFlag: "",
+ punishFlag: "",
+ rectificationEndTime: "",
+ punishRemark: ""
},
desc: "",
@@ -137,7 +165,6 @@
value: 1
},
],
-
questionList: [],
itemIndex: [],
patrolRecordVOList: [],
@@ -151,6 +178,9 @@
id: 2
}
],
+ time: Number(new Date()),
+ showSelectDate: false,
+ dangerCount: 0 //隐患项数量
}
},
@@ -201,7 +231,8 @@
},
getSelected() {
- let arr = []
+ let arr = [];
+ let count = 0;
for (let i = 0, ii = this.questionList.length; i < ii; i++) {
for (let k = 0, kk = this.questionList[i].children.length; k < kk; k++) {
if (this.questionList[i].children[k].state != null) {
@@ -211,9 +242,13 @@
imageUrls: this.setImages(this.questionList[i].children[k].urls),
remark: this.questionList[i].children[k].remark || ""
})
+ if (this.questionList[i].children[k].state == 0) {
+ count += 1;
+ }
}
}
}
+ this.dangerCount = count;
return arr;
},
@@ -343,6 +378,11 @@
urls: [this.signatureUrl],
current: this.signatureUrl
})
+ },
+
+ confirmDate(e) {
+ this.showSelectDate = false;
+ this.info.rectificationEndTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
}
}
@@ -350,8 +390,16 @@
</script>
<style lang="less">
+ page {
+ background-color: #f5f5f5;
+ }
+
.wrap {
- padding: 20rpx;
+ .section {
+ padding: 0 20rpx;
+ margin: 20rpx 20rpx 0;
+ background-color: #fff;
+ }
}
.top {
@@ -367,8 +415,13 @@
}
.content {
- margin: 20rpx 0;
- padding: 0 30rpx 150rpx;
+ margin: 20rpx;
+ padding: 20rpx 30rpx;
+ }
+
+ .cell {
+ margin: 0 20rpx;
+ padding: 20rpx 30rpx;
}
.site-box {
@@ -479,4 +532,9 @@
/deep/ .u-form-item__body__left__content {
font-size: 26rpx;
}
+
+ .blank {
+ width: 100%;
+ height: 140rpx;
+ }
</style>
\ No newline at end of file
diff --git a/subPackage/house/roomDetails/detail.vue b/subPackage/house/roomDetails/detail.vue
index 8075ce5..a65b377 100644
--- a/subPackage/house/roomDetails/detail.vue
+++ b/subPackage/house/roomDetails/detail.vue
@@ -6,7 +6,7 @@
</view>
<view class="container">
<house-number ref="house" v-show="tabIndex == 0" />
- <room-detail ref="room" v-show="tabIndex == 1" />
+ <room-detail ref="room" v-show="tabIndex == 1" />
</view>
</view>
</template>
@@ -36,8 +36,12 @@
onLoad(option) {
// this.tabIndex = option.type;
uni.setNavigationBarTitle({
- title:"门牌信息"
+ title: "门牌信息"
})
+ if (uni.getStorageSync("activeRole").roleName == "民警" || uni.getStorageSync("activeRole").roleName ==
+ "系统管理员") {
+ this.$refs.house.isPolice = true;
+ }
this.code = option.code;
this.$refs.house.stdId = option.code;
this.$refs.house.getBuildingDetail();
@@ -49,11 +53,11 @@
methods: {
changeTab(e) {
- if(e.index == this.tabIndex) return;
+ if (e.index == this.tabIndex) return;
this.tabIndex = e.index;
if (e.index == 0) {
uni.setNavigationBarTitle({
- title:"门牌信息"
+ title: "门牌信息"
})
this.$refs.house.stdId = this.code;
this.$refs.house.getBuildingDetail();
diff --git a/subPackage/workbench/views/audit.vue b/subPackage/workbench/views/audit.vue
index aaeac90..c2faa4c 100644
--- a/subPackage/workbench/views/audit.vue
+++ b/subPackage/workbench/views/audit.vue
@@ -219,6 +219,8 @@
this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
} else if (reportType == 6) {
this.$u.func.globalNavigator(`schoolReportDetail?id=${id}`)
+ } else {
+ this.$u.func.globalNavigator(`checkReform?id=${id}`)
}
},
diff --git a/subPackage/workbench/views/checkReform.vue b/subPackage/workbench/views/checkReform.vue
index ce57058..0c4bb2f 100644
--- a/subPackage/workbench/views/checkReform.vue
+++ b/subPackage/workbench/views/checkReform.vue
@@ -1,312 +1,185 @@
<template>
- <view class="wrap">
- <u-collapse :value="itemIndex" ref="collapse">
- <u-collapse-item :title="item.title" :name="index" v-for="(item,index) in questionList">
- <u-form :model="info" ref="form">
- <block v-for="(i,k) in item.children">
- <view class="f-30 c-33">
- {{i.title}}
- </view>
- <u-form-item labelWidth="90" label="隐患" prop="gateStatus">
- <view class="btn-group flex">
- <view class="value-item" :class="i.state == 0?'active bgc-main c-ff':''"
- @click="changeStatus(0,i,index,k)">
- 存在
- </view>
- <view class="value-item" :class="i.state == 1?'active bgc-main c-ff':''"
- @click="changeStatus(1,i,index,k)">
- 不存在
- </view>
- </view>
- </u-form-item>
- <view class="" v-if="i.state == 0">
- <u-form-item labelWidth="100" label="隐患照片" prop="gateStatus">
- <u-upload :fileList="i.urls" :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
- :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
- @afterRead="afterReadImgs($event,i,index,k)" @delete="deleteImages($event,index,k)">
- <view class="upload-item upload-icon flex_base">
- <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
- </view>
- </u-upload>
- </u-form-item>
- <u-form-item labelWidth="100" label="隐患描述" prop="gateStatus">
- <u-textarea v-model="i.remark" placeholder="请输入隐患描述"
- placeholderClass="c-99 f-26"></u-textarea>
- </u-form-item>
- </view>
- </block>
- </u-form>
- </u-collapse-item>
- </u-collapse>
-
- <view class="content">
- <view class="upload ">
- <view class="f-28 mb-20">其它隐患问题</view>
- <u-textarea v-model="info.remark" placeholder="请输入内容" placeholderClass="c-99 f-26"></u-textarea>
- <view class="mt-20">
- <view class="f-28 mb-20">图片</view>
- <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
- :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
- @delete="deletePic">
- <view class="upload-item upload-icon flex_base">
- <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
- </view>
- </u-upload>
- </view>
- </view>
+ <view class="">
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>场所名称</text>
+ <text class="item-content">{{info.placeName}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>标签</text>
+ <text>{{label || "未完善"}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>场所负责人</text>
+ <text>{{info.principal || "未完善"}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>场所负责人电话</text>
+ <text>{{info.principalPhone || "未完善"}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>检查人</text>
+ <text>{{info.name}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>检查时间</text>
+ <text>{{info.createTime}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>地址</text>
+ <text class="item-content">{{info.location}}</text>
</view>
- <footer-btn @click="sumitInfo"></footer-btn>
+ <view class="item-row flex j-c-s-b a-i-c" v-if="info.remark">
+ <text>其它隐患问题</text>
+ <text class="item-content">{{info.remark}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c" v-if="info.rectificationNoticeFlag == 1">
+ <text>下发整改通知</text>
+ <text class="item-content">是</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c" v-if="info.punishFlag == 1">
+ <text>是否处罚</text>
+ <text class="item-content">是</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c" v-if="info.punishRemark">
+ <text>处罚说明</text>
+ <text class="item-content">{{info.punishRemark}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c" v-if="info.rectificationEndTime">
+ <text>整改截至时间</text>
+ <text class="item-content">{{info.rectificationEndTime}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c" v-if="inof.remark">
+ <text>其它隐患问题</text>
+ <text class="item-content">{{info.remark}}</text>
+ </view>
+ <view class="image-wrap bgc-ff" v-if="images.length">
+ <view class="mb-20">
+ 图片
+ </view>
+ <view class="flex flex-wrap">
+ <view class="image-item" v-for="(i,k) in images" @click="previewImage(images,i)">
+ <u-image :src="i" width="100rpx" height="100rpx"></u-image>
+ </view>
+ </view>
+
+ </view>
+
+ <view class="image-wrap bgc-ff" v-if="signatureUrl.length">
+ <view class="mb-20">
+ 签名
+ </view>
+ <view class="image-item" v-for="(i,k) in signatureUrl" @click="previewImage(signatureUrl,i)">
+ <u-image :src="i" width="100rpx" height="100rpx"></u-image>
+ </view>
+ </view>
+ <view class="mt-20 bgc-ff">
+ <block v-for="(item,index) in itemList">
+ <block v-for="(i,k) in item.children">
+ <block v-for="(n,m) in info.patrolRecordVOList">
+ <view class="item-row flex j-c-s-b a-i-c" v-if="i.id == n.itemId && n.state == 1">
+ <text class="item-left">{{i.title}}</text>
+ <text>不存在</text>
+ </view>
+ <u-collapse ref="collapse" v-if="i.id == n.itemId && n.state == 0">
+ <u-collapse-item :name="index" :title="i.title" value="存在">
+ <view class="mb-20" v-if="n.remark">
+ <view class="f-26 mb-10" style="color:#000">隐患描述</view>
+ <view class="f-28" style="color:#000">
+ {{n.remark}}
+ </view>
+ </view>
+ <view class="mb-20" v-if="n.imageUrls">
+ <view class="f-26 mb-10" style="color:#000">隐患照片</view>
+ <view class="flex flex-wrap">
+ <view class="mr-20" v-for="r in ($setImageUrl(n.imageUrls))">
+ <u-image :src="r" width="100rpx" height="100rpx"
+ @click="previewImage($setImageUrl(n.imageUrls),i)"></u-image>
+ </view>
+ </view>
+ </view>
+ <view class="">
+ <view class="f-26 mb-10">整改后照片</view>
+ <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
+ :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
+ @afterRead="afterReadImg" @delete="deletePic">
+ <view class="upload-item upload-icon flex_base">
+ <u-icon name="/static/icon/upload.png" width="60rpx"
+ height="60rpx"></u-icon>
+ </view>
+ </u-upload>
+ </view>
+ </u-collapse-item>
+ </u-collapse>
+ </block>
+ </block>
+ </block>
+ </view>
+
+
+ <footer-btn />
</view>
</template>
<script>
import uploadMixin from "@/mixin/uploadMixin";
import {
- addPlaceCheckTwo,
- getPlaceCheckItem
- } from "@/api/place/place.js"
+ getPlaceCheckItem,
+ getPlaceCheckDetail,
+ getPlaceCheckReformDetail
+ } from '@/api/place/place.js'
export default {
mixins: [uploadMixin],
data() {
return {
- form: {
- images: []
- },
- info: {
- remark: "",
- imageUrls: "",
- signaturePath: "",
- },
-
- desc: "",
- title: "",
- curSelectSite: {},
- showSignature: false,
- signatureUrl: "",
- signatureSettings: { //签名设置
- width: '700', //签名区域的宽
- height: '800', //签名区域的高
- lineWidth: 3, //签名时线宽
- textColor: '#007AFF' //签名文字颜色
- },
- statusOption: [{
- text: "存在",
- value: 0
- },
- {
- text: "不存在",
- value: 1
- },
- ],
-
- questionList: [],
- itemIndex: [],
- patrolRecordVOList: [],
- count: 0,
- statusList: [{
- name: "是",
- id: 1
- },
- {
- name: "否",
- id: 2
- }
- ],
-
+ info: {},
+ images: [],
+ signatureUrl: [],
+ label: "",
+ itemList: []
}
},
- onLoad(option) {
- this.info.houseCode = option.code;
- this.getItem();
+ async onLoad(option) {
+ await this.getItem();
+ this.getDetail(option.id);
},
-
methods: {
+ getDetail(id) {
+ getPlaceCheckReformDetail({
+ taskId: id
+ }).then(res => {
+ this.info = res.data;
+ this.images = this.$setImageUrl(res.data.imageUrls);
+ this.signatureUrl = this.$setImageUrl(res.data.signaturePath);
+ if (res.data.placePoiLabelVOList.length) {
+ this.label = res.data.placePoiLabelVOList[res.data.placePoiLabelVOList.length - 1]
+ .labelName;
+ }
+
+ // this.label = res.data.
+ })
+ },
getItem() {
getPlaceCheckItem().then(res => {
- let data = res.data;
- this.questionList = res.data;
- let arr = []
- let obj = {
- itemId: "",
- state: "",
- imagesUrl: "",
- remark: ""
- }
- let count = 0;
- for (let i = 0, ii = data.length; i < ii; i++) {
- arr.push(i);
- for (let k = 0, kk = data[i].children.length; k < kk; k++) {
- // this.info.patrolRecordVOList.push(obj);
- count += 1;
- }
- }
- this.count = count;
- this.itemIndex = arr;
- })
- },
-
- changeStatus(value, item, fIndex, cIndex) {
- let children = this.questionList[fIndex];
- children.children[cIndex].state = value;
- this.$set(this.questionList, fIndex, children)
- if (value == 0 && !item.urls) {
- children.children[cIndex].urls = [];
- this.$set(this.questionList, fIndex, children)
- }
- this.$nextTick(() => {
- this.$refs.collapse.init();
- })
- this.getSelected()
- },
-
- getSelected() {
- let arr = []
- for (let i = 0, ii = this.questionList.length; i < ii; i++) {
- for (let k = 0, kk = this.questionList[i].children.length; k < kk; k++) {
- if (this.questionList[i].children[k].state != null) {
- arr.push({
- itemId: this.questionList[i].children[k].id,
- state: this.questionList[i].children[k].state,
- imageUrls: this.setImages(this.questionList[i].children[k].urls),
- remark: this.questionList[i].children[k].remark || ""
- })
- }
- }
- }
- return arr;
- },
-
- setImages(key) {
- if (!key) {
- return ""
- } else {
- let urls = [];
- for (let i of key) {
- urls.push(i.name);
- }
- return urls.join(",")
- }
- },
-
- async afterReadImgs(event, item, fIndex, cIndex) {
- this.showLoading()
- let children = this.questionList[fIndex];
- let lists = [].concat(event.file)
- let fileListLen = item.urls.length;
- lists.map((item) => {
- children.children[cIndex].urls.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- this.$set(this.questionList, fIndex, children)
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- children.children[cIndex].urls.splice(fileListLen, 1, Object.assign({}, {
- url: result.data.link,
- name: result.data.name
- }))
- this.$set(this.questionList, fIndex, children)
- fileListLen++
- }
- this.loadingClose()
- this.getSelected()
- },
-
- deleteImages(event, fIndex, cIndex) {
- let children = this.questionList[fIndex];
- children.children[cIndex].urls.splice(event.index, 1);
- this.$set(this.questionList, fIndex, children);
- this.getSelected()
- },
-
- signatureChange(e) {
- // this.signatureUrl = e;
- this.uploadSignImg(e)
- },
-
- showSignPopup() {
- // if (this.getSelected().length < this.count) {
- // this.$showTips("还有内容还未完善");
- // return;
- // }
-
- let data = this.getSelected();
- for (let i of data) {
- if (i.state == 1) {
- if (i.imageUrls || i.remark) {
- i.imageUrls = "";
- i.remark = "";
- }
- } else {
- if (!i.imageUrls && !i.remark) {
- this.$showTips("请上传隐患照片或填写隐患描述");
- return;
- }
- }
- }
- this.showSignature = true;
- },
-
- uploadSignImg(url) {
- uni.uploadFile({
- url: this.uploadConfig.url,
- filePath: url,
- name: 'file',
- header: this.uploadConfig.header,
- success: (res) => {
- console.log(res);
- let data = JSON.parse(res.data);
- if (res.statusCode == 200 && data.code == 200) {
- // this.handleSubmit(data.data.name);
- this.showSignature = false;
- this.signatureUrl = data.data.link;
- this.info.signaturePath = data.data.name;
- // this.sumitInfo()
- }
+ if (res.code == 200) {
+ this.itemList = res.data;
}
})
},
- sumitInfo() {
- uni.showLoading({
- title: "加载中..."
- })
- if (this.form.images.length > 0) {
- let urls = []
- this.form.images.forEach(e => {
- urls.push(e.name)
- })
- this.info.imageUrls = urls.join(",")
- }
- this.info.patrolRecordVOList = this.getSelected()
-
- addPlaceCheckTwo(this.info).then(res => {
- uni.hideLoading();
- uni.showToast({
- icon: 'success',
- title: '提交成功',
- success() {
- setTimeout(() => {
- uni.navigateBack();
- }, 1000)
- }
- })
- })
+ setUrl(src) {
+ return this.$setImageUrl(url)
},
- previewImg() {
+ previewImage(urls, current) {
uni.previewImage({
- urls: [this.signatureUrl],
- current: this.signatureUrl
+ urls,
+ current
})
}
@@ -314,134 +187,56 @@
}
</script>
-<style lang="less">
- .wrap {
- padding: 20rpx;
+<style lang="scss">
+ page {
+ background-color: #f5f5f5;
}
- .top {
- display: flex;
- justify-content: flex-end;
- padding: 20rpx;
- }
-
- .top-btn {
- padding: 16rpx 22rpx;
- border-radius: 6rpx;
- text-align: center;
- }
-
- .content {
- margin: 20rpx 0;
- padding: 0 30rpx 150rpx;
- }
-
- .site-box {
+ .item-row {
+ width: 100%;
padding: 30rpx;
- margin: 20rpx 30rpx;
- border-radius: 4rpx;
+ box-sizing: border-box;
+ border-bottom: 1px solid #f5f5f5;
+ font-size: 28rpx;
+ background-color: #fff;
- .c-aa {
- color: #aaa;
+ .item-content {
+ width: 70%;
+ text-align: right;
}
- .address {
- width: 60%;
- margin-left: 25rpx;
+ .item-left {
+ width: 70%;
}
+ }
+
+ .image-wrap {
+ margin-top: 20rpx;
+ padding: 20rpx;
+
+ .image-item {
+ margin-right: 20rpx;
+ }
+ }
+
+ /deep/.u-cell__title-text {
+ color: #000 !important;
+ width: 70%;
+ font-size: 28rpx !important;
+ }
+
+ /deep/ .u-cell__value {
+ color: #000 !important;
+ font-size: 28rpx !important;
+ }
+
+ .mr-20 {
+ margin-right: 20rpx;
}
.upload-item {
width: 140rpx;
height: 140rpx;
border: 1px solid #EEEEEE;
- }
-
- .upload {
- // margin: 0 30rpx;
- padding: 30rpx 0;
- }
-
- .submit-btn {
- width: 690rpx;
- height: 78rpx;
- line-height: 78rpx;
- background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- font-size: 32rpx;
- color: #fff;
- margin-top: 50rpx;
- }
-
- .list-btn {
- width: 690rpx;
- height: 78rpx;
- line-height: 78rpx;
- background: linear-gradient(163deg, #c7d7dc 0%, #c3cdd8 100%);
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- font-size: 32rpx;
- color: #fff;
- margin-top: 50rpx;
- }
-
- .address-row {
- flex: 1;
- justify-content: flex-end;
- align-items: center;
- }
-
- .address-content {
- width: calc(100% - 116rpx - 20rpx);
- margin-right: 20rpx;
- text-align: right;
- }
-
- .location-btn {
- width: 116rpx;
- height: 46rpx;
- line-height: 46rpx;
- border-radius: 4rpx;
- border: 1px solid currentColor;
- padding: 0;
- background-color: #fff;
- text-align: center;
- }
-
-
- .signture-popup {
- padding-bottom: 20rpx;
- }
-
- .sign {
- padding: 30rpx;
- // margin: 0 30rpx;
- }
-
- .value-item {
- flex: 1;
- // background-color: #ffffff;
- // width: 120rpx;
- border: 2rpx solid #f5f5f5;
- height: 70rpx;
- line-height: 70rpx;
- box-sizing: border-box;
- text-align: center;
- }
-
- .active {
- border: 2rpx solid currentColor;
- }
-
- .btn-group {
- flex: 1;
- }
-
- /deep/ .u-cell__title-text {
- font-weight: bold;
- font-size: 30rpx;
- }
-
- /deep/ .u-form-item__body__left__content {
- font-size: 26rpx;
}
</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/checkReform3.vue b/subPackage/workbench/views/checkReform3.vue
new file mode 100644
index 0000000..888b099
--- /dev/null
+++ b/subPackage/workbench/views/checkReform3.vue
@@ -0,0 +1,463 @@
+<template>
+ <view class="wrap">
+ <u-collapse :value="itemIndex" ref="collapse">
+ <u-collapse-item :title="item.title" :name="index" v-for="(item,index) in questionList">
+ <u-form :model="info" ref="form">
+ <block v-for="(i,k) in item.children">
+ <view class="f-30 c-33">
+ {{i.title}}
+ </view>
+ <u-form-item labelWidth="90" label="隐患" prop="gateStatus">
+ <view class="btn-group flex">
+ <view class="value-item" :class="i.state == 0?'active bgc-main c-ff':''"
+ @click="changeStatus(0,i,index,k)">
+ 存在
+ </view>
+ <view class="value-item" :class="i.state == 1?'active bgc-main c-ff':''"
+ @click="changeStatus(1,i,index,k)">
+ 不存在
+ </view>
+ </view>
+ </u-form-item>
+ <view class="" v-if="i.state == 0">
+ <u-form-item labelWidth="100" label="隐患照片" prop="gateStatus">
+ <u-upload :fileList="i.urls" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
+ :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
+ @afterRead="afterReadImgs($event,i,index,k)" @delete="deleteImages($event,index,k)">
+ <view class="upload-item upload-icon flex_base">
+ <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
+ </view>
+ </u-upload>
+ </u-form-item>
+ <u-form-item labelWidth="100" label="隐患描述" prop="gateStatus">
+ <u-textarea v-model="i.remark" placeholder="请输入隐患描述"
+ placeholderClass="c-99 f-26"></u-textarea>
+ </u-form-item>
+ </view>
+ </block>
+ </u-form>
+ </u-collapse-item>
+ </u-collapse>
+
+ <view class="content">
+ <view class="upload ">
+ <view class="f-28 mb-20">其它隐患问题</view>
+ <u-textarea v-model="info.remark" placeholder="请输入内容" placeholderClass="c-99 f-26"></u-textarea>
+ <view class="mt-20">
+ <view class="f-28 mb-20">图片</view>
+ <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
+ :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
+ @delete="deletePic">
+ <view class="upload-item upload-icon flex_base">
+ <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
+ </view>
+ </u-upload>
+ </view>
+ </view>
+ </view>
+
+ <footer-btn @click="sumitInfo"></footer-btn>
+
+ </view>
+</template>
+
+<script>
+ import uploadMixin from "@/mixin/uploadMixin";
+ import {
+ addPlaceCheckTwo,
+ getPlaceCheckItem,
+ getPlaceCheckReformDetail
+ } from "@/api/place/place.js"
+ export default {
+ mixins: [uploadMixin],
+ data() {
+ return {
+ form: {
+ images: []
+ },
+ info: {
+ houseCode: "",
+ remark: "",
+ imageUrls: "",
+ signaturePath: "",
+ },
+
+ desc: "",
+ title: "",
+ curSelectSite: {},
+ showSignature: false,
+ signatureUrl: "",
+ signatureSettings: { //签名设置
+ width: '700', //签名区域的宽
+ height: '800', //签名区域的高
+ lineWidth: 3, //签名时线宽
+ textColor: '#007AFF' //签名文字颜色
+ },
+ statusOption: [{
+ text: "存在",
+ value: 0
+ },
+ {
+ text: "不存在",
+ value: 1
+ },
+ ],
+
+ questionList: [],
+ itemIndex: [],
+ patrolRecordVOList: [],
+ count: 0,
+ statusList: [{
+ name: "是",
+ id: 1
+ },
+ {
+ name: "否",
+ id: 2
+ }
+ ],
+
+ }
+ },
+ async onLoad(option) {
+ await this.getItem();
+ this.getDetail(option.id);
+
+ },
+
+ methods: {
+
+
+ getDetail(id) {
+ getPlaceCheckReformDetail({
+ taskId: id
+ }).then(res => {
+ if (res.code == 200) {
+ for (let i in this.info) {
+ this.info[i] = res.data[i];
+ }
+ }
+ })
+ },
+
+
+ getItem() {
+ getPlaceCheckItem().then(res => {
+ let data = res.data;
+ this.questionList = res.data;
+ let arr = []
+ let obj = {
+ itemId: "",
+ state: "",
+ imagesUrl: "",
+ remark: ""
+ }
+ let count = 0;
+ for (let i = 0, ii = data.length; i < ii; i++) {
+ arr.push(i);
+ for (let k = 0, kk = data[i].children.length; k < kk; k++) {
+ // this.info.patrolRecordVOList.push(obj);
+ count += 1;
+ }
+ }
+ this.count = count;
+ this.itemIndex = arr;
+ })
+ },
+
+ changeStatus(value, item, fIndex, cIndex) {
+ let children = this.questionList[fIndex];
+ children.children[cIndex].state = value;
+ this.$set(this.questionList, fIndex, children)
+ if (value == 0 && !item.urls) {
+ children.children[cIndex].urls = [];
+ this.$set(this.questionList, fIndex, children)
+ }
+ this.$nextTick(() => {
+ this.$refs.collapse.init();
+ })
+ this.getSelected()
+ },
+
+ getSelected() {
+ let arr = []
+ for (let i = 0, ii = this.questionList.length; i < ii; i++) {
+ for (let k = 0, kk = this.questionList[i].children.length; k < kk; k++) {
+ if (this.questionList[i].children[k].state != null) {
+ arr.push({
+ itemId: this.questionList[i].children[k].id,
+ state: this.questionList[i].children[k].state,
+ imageUrls: this.setImages(this.questionList[i].children[k].urls),
+ remark: this.questionList[i].children[k].remark || ""
+ })
+ }
+ }
+ }
+ return arr;
+ },
+
+ setImages(key) {
+ if (!key) {
+ return ""
+ } else {
+ let urls = [];
+ for (let i of key) {
+ urls.push(i.name);
+ }
+ return urls.join(",")
+ }
+ },
+
+ async afterReadImgs(event, item, fIndex, cIndex) {
+ this.showLoading()
+ let children = this.questionList[fIndex];
+ let lists = [].concat(event.file)
+ let fileListLen = item.urls.length;
+ lists.map((item) => {
+ children.children[cIndex].urls.push({
+ ...item,
+ status: 'uploading',
+ message: '上传中'
+ })
+ this.$set(this.questionList, fIndex, children)
+ })
+ for (let i = 0; i < lists.length; i++) {
+ const result = await this.uploadFilePromise(lists[i].url)
+ children.children[cIndex].urls.splice(fileListLen, 1, Object.assign({}, {
+ url: result.data.link,
+ name: result.data.name
+ }))
+ this.$set(this.questionList, fIndex, children)
+ fileListLen++
+ }
+ this.loadingClose()
+ this.getSelected()
+ },
+
+ deleteImages(event, fIndex, cIndex) {
+ let children = this.questionList[fIndex];
+ children.children[cIndex].urls.splice(event.index, 1);
+ this.$set(this.questionList, fIndex, children);
+ this.getSelected()
+ },
+
+ signatureChange(e) {
+ // this.signatureUrl = e;
+ this.uploadSignImg(e)
+ },
+
+ showSignPopup() {
+ // if (this.getSelected().length < this.count) {
+ // this.$showTips("还有内容还未完善");
+ // return;
+ // }
+
+ let data = this.getSelected();
+ for (let i of data) {
+ if (i.state == 1) {
+ if (i.imageUrls || i.remark) {
+ i.imageUrls = "";
+ i.remark = "";
+ }
+ } else {
+ if (!i.imageUrls && !i.remark) {
+ this.$showTips("请上传隐患照片或填写隐患描述");
+ return;
+ }
+ }
+ }
+ this.showSignature = true;
+ },
+
+ uploadSignImg(url) {
+ uni.uploadFile({
+ url: this.uploadConfig.url,
+ filePath: url,
+ name: 'file',
+ header: this.uploadConfig.header,
+ success: (res) => {
+ console.log(res);
+ let data = JSON.parse(res.data);
+ if (res.statusCode == 200 && data.code == 200) {
+ // this.handleSubmit(data.data.name);
+ this.showSignature = false;
+ this.signatureUrl = data.data.link;
+ this.info.signaturePath = data.data.name;
+ // this.sumitInfo()
+ }
+ }
+ })
+ },
+
+ sumitInfo() {
+ uni.showLoading({
+ title: "加载中..."
+ })
+ if (this.form.images.length > 0) {
+ let urls = []
+ this.form.images.forEach(e => {
+ urls.push(e.name)
+ })
+ this.info.imageUrls = urls.join(",")
+ }
+
+ this.info.patrolRecordVOList = this.getSelected()
+
+ addPlaceCheckTwo(this.info).then(res => {
+ uni.hideLoading();
+ uni.showToast({
+ icon: 'success',
+ title: '提交成功',
+ success() {
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 1000)
+ }
+ })
+ })
+ },
+
+ previewImg() {
+ uni.previewImage({
+ urls: [this.signatureUrl],
+ current: this.signatureUrl
+ })
+ }
+
+ }
+ }
+</script>
+
+<style lang="less">
+ .wrap {
+ padding: 20rpx;
+ }
+
+ .top {
+ display: flex;
+ justify-content: flex-end;
+ padding: 20rpx;
+ }
+
+ .top-btn {
+ padding: 16rpx 22rpx;
+ border-radius: 6rpx;
+ text-align: center;
+ }
+
+ .content {
+ margin: 20rpx 0;
+ padding: 0 30rpx 150rpx;
+ }
+
+ .site-box {
+ padding: 30rpx;
+ margin: 20rpx 30rpx;
+ border-radius: 4rpx;
+
+ .c-aa {
+ color: #aaa;
+ }
+
+ .address {
+ width: 60%;
+ margin-left: 25rpx;
+ }
+ }
+
+ .upload-item {
+ width: 140rpx;
+ height: 140rpx;
+ border: 1px solid #EEEEEE;
+ }
+
+ .upload {
+ // margin: 0 30rpx;
+ padding: 30rpx 0;
+ }
+
+ .submit-btn {
+ width: 690rpx;
+ height: 78rpx;
+ line-height: 78rpx;
+ background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
+ border-radius: 8rpx 8rpx 8rpx 8rpx;
+ font-size: 32rpx;
+ color: #fff;
+ margin-top: 50rpx;
+ }
+
+ .list-btn {
+ width: 690rpx;
+ height: 78rpx;
+ line-height: 78rpx;
+ background: linear-gradient(163deg, #c7d7dc 0%, #c3cdd8 100%);
+ border-radius: 8rpx 8rpx 8rpx 8rpx;
+ font-size: 32rpx;
+ color: #fff;
+ margin-top: 50rpx;
+ }
+
+ .address-row {
+ flex: 1;
+ justify-content: flex-end;
+ align-items: center;
+ }
+
+ .address-content {
+ width: calc(100% - 116rpx - 20rpx);
+ margin-right: 20rpx;
+ text-align: right;
+ }
+
+ .location-btn {
+ width: 116rpx;
+ height: 46rpx;
+ line-height: 46rpx;
+ border-radius: 4rpx;
+ border: 1px solid currentColor;
+ padding: 0;
+ background-color: #fff;
+ text-align: center;
+ }
+
+
+ .signture-popup {
+ padding-bottom: 20rpx;
+ }
+
+ .sign {
+ padding: 30rpx;
+ // margin: 0 30rpx;
+ }
+
+ .value-item {
+ flex: 1;
+ // background-color: #ffffff;
+ // width: 120rpx;
+ border: 2rpx solid #f5f5f5;
+ height: 70rpx;
+ line-height: 70rpx;
+ box-sizing: border-box;
+ text-align: center;
+ }
+
+ .active {
+ border: 2rpx solid currentColor;
+ }
+
+ .btn-group {
+ flex: 1;
+ }
+
+ /deep/ .u-cell__title-text {
+ font-weight: bold;
+ font-size: 30rpx;
+ }
+
+ /deep/ .u-form-item__body__left__content {
+ font-size: 26rpx;
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
index ebf551f..0f0bf04 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -28,7 +28,7 @@
</u-input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <u-form-item label="九小场所" labelWidth="100" prop="isNine" :required="isRequired">
+ <u-form-item label="九小场所:" labelWidth="100" prop="isNine" :required="isRequired">
<u-radio-group v-model="form.isNine" v-if="!currentId">
<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList"
:key="index" :label="item.name" :name="item.id">
@@ -45,8 +45,7 @@
</u-input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <u-form-item v-if="form.isNine == 1" label="阵地" labelWidth="100" prop="isFront"
- :required="isRequired">
+ <u-form-item label="阵地:" labelWidth="100" prop="isFront" :required="isRequired">
<u-radio-group v-model="form.isFront" v-if="!currentId">
<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList"
:key="index" :label="item.name" :name="item.id">
@@ -92,7 +91,8 @@
<view class="address-content f-28" v-if="!form.jwd" style="color: #c0c4cc;">
请选择地址
</view>
- <view class="location-btn c-main f-24" @click="getLocation()" v-if="!currentId">
+ <view class="location-btn c-main f-24" @click="getLocation()"
+ v-if="(!currentId && !isView) || (isView && !form.jwd)">
获取地址
</view>
</view>
@@ -118,6 +118,11 @@
<u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
label="手机号:" prop="principalPhone">
<u--input border="none" type="number" v-model="form.principalPhone" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="身份证号:" prop="principalIdCard">
+ <u--input border="none" type="idcard" v-model="form.principalIdCard" placeholder="请输入">
</u--input>
</u-form-item>
</view>
@@ -242,7 +247,8 @@
minioBaseUrl
} from "../../../common/setting";
import {
- bizDictionary
+ bizDictionary,
+ bizDictionaryTree
} from '@/api/system/dict.js'
export default {
mixins: [uploadMixin],
@@ -271,6 +277,7 @@
placeName: "",
principal: '',
principalPhone: '',
+ principalIdCard: '',
lat: '',
lng: '',
location: '',
@@ -322,6 +329,22 @@
message: '手机号码不正确',
trigger: ['change', 'blur']
+ }
+ ],
+ 'form.principalIdCard': [{
+ type: 'string',
+ required: false,
+ message: '请输入身份证号码',
+ trigger: ['change', 'blur']
+ },
+ {
+ validator: (rule, value, callback) => {
+ const idCardRegex =
+ /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
+ return idCardRegex.test(value)
+ },
+ message: '身份证号码有误',
+ trigger: ['change', 'blur']
}
],
},
@@ -468,7 +491,8 @@
showNineTypePicker: false,
showFrontTypePicker: false,
nineTypeValue: "",
- frontTypeValue: ""
+ frontTypeValue: "",
+ isView: false
}
@@ -479,7 +503,10 @@
options: {
styleIsolation: 'shared', // 解除样式隔离
},
- onLoad(option) {
+ async onLoad(option) {
+ await this.getCategory();
+ await this.getAllBizDict();
+ this.getNineTypeList();
const {
type
} = option
@@ -494,6 +521,7 @@
this.form.houseCode = option.houseCode
}
if (option.id || option.houseCode) {
+ this.isView = true;
this.getBuildingDetail()
}
if (!!type || type != void 0) {
@@ -501,8 +529,8 @@
title: '详情'
})
}
- this.getCategory();
- this.getAllBizDict();
+
+
},
watch: {
@@ -522,6 +550,14 @@
// },
// immediate:true
// }
+
+ },
+ onReady() {
+ this.$refs.form.setRules(this.rules)
+ },
+
+
+ onUnload() {
},
@@ -593,6 +629,15 @@
})
})
},
+
+ getNineTypeList() {
+ bizDictionaryTree({
+ code: "nineType"
+ }).then(res => {
+ console.log(res.data);
+ })
+ },
+
navTo(type) {
if (type == 1) {
@@ -668,6 +713,7 @@
},
getBuildingDetail(params = {}) {
+
let idorCodeParams = {}
if (this.houseCode) {
idorCodeParams = {
@@ -683,6 +729,9 @@
id: this.currentId
}
}
+ uni.showLoading({
+ title: "加载中..."
+ })
getPlaceDetail({
...params,
...idorCodeParams
@@ -690,6 +739,7 @@
code,
data
}) => {
+ uni.hideLoading();
if (code !== 200) {
uni.showToast({
title: "数据加载失败",
@@ -739,7 +789,7 @@
this.nineTypeValue = name;
}
- if (key == "isFrontType") {
+ if (key == "isFront") {
let {
index,
name
@@ -747,10 +797,8 @@
this.frontTypeIndex = index;
this.frontTypeValue = name;
}
-
})
-
- this.form.jwd = `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`
+ this.$set(this.form, "jwd", `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`)
this.form.building = arr.join("")
let labelList = data.placePoiLabelVOList;
let tempLabelList = [];
@@ -762,13 +810,13 @@
this.firstId = tempLabelList[0].poiCode;
this.categoryValue = tempLabelList[1].labelName;
this.form.label = tempLabelList[1].poiCode
- setTimeout(() => {
- let firstIndex = this.categoryList[0].findIndex(i => i.categoryNo ==
- tempLabelList[0].poiCode)
- let childIndex = this.categoryList[1].findIndex(i => i.categoryNo ==
- tempLabelList[1].poiCode)
- this.categoryIndex = [firstIndex, childIndex]
- }, 500)
+ // setTimeout(() => {
+ let firstIndex = this.categoryList[0].findIndex(i => i.categoryNo ==
+ tempLabelList[0].poiCode)
+ let childIndex = this.categoryList[1].findIndex(i => i.categoryNo ==
+ tempLabelList[1].poiCode)
+ this.categoryIndex = [firstIndex, childIndex]
+ // }, 500)
Object.keys(this.comprehensiveData).forEach(key => {
@@ -857,18 +905,19 @@
this.$set(this.pickColumns, index, data)
},
- getLocation() {
- const that = this
+ //获取当前位置信息
+ getCurrentLocation() {
uni.getLocation({
- type: 'wgs84', // 坐标系类型
- success: function(res) {
+ type: 'gcj02', // 坐标系类型
+ success: (res) => {
var latitude = res.latitude; // 维度
var longitude = res.longitude; // 经度
- that.form.lng = longitude
- that.form.lat = latitude
+ this.form.lng = longitude
+ this.form.lat = latitude
+ this.form.jwd =
+ `${Number(res.longitude).toFixed(6)},${Number(res.latitude).toFixed(6)}`
- that.form.jwd = longitude + "," + latitude
},
fail: function(res) {
console.log('获取定位失败:' + res.errMsg);
--
Gitblit v1.9.3