From b1942d99f0d3c9c5bde5cbb9f3364dd07fbd2cc4 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Wed, 31 Jan 2024 17:54:47 +0800
Subject: [PATCH] 更新
---
pages/home/index.vue | 8
subPackage/workbench/views/checkReform.vue | 447 +++++++++++++++++++++++++++++++++++++++++++++++++
pages.json | 9 +
subPackage/workbench/views/cscj.vue | 2
subPackage/house/houseNumber/siteInspect.vue | 55 +++++-
5 files changed, 507 insertions(+), 14 deletions(-)
diff --git a/pages.json b/pages.json
index 7c0e775..bfb83ec 100644
--- a/pages.json
+++ b/pages.json
@@ -581,6 +581,15 @@
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
+ },
+ {
+ "path": "views/checkReform",
+ "style": {
+ "navigationBarTitleText": "场所检查详情",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black"
+ }
}
]
},
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 9ed9e26..5220718 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -37,7 +37,7 @@
</view>
</view>
- <view class="block flex a-i-c j-c-s-b mb-20" v-if="roleType == 1 || roleType == 3 || !isLogin">
+ <view class="block flex a-i-c j-c-s-b mb-20" v-if="roleType == 1 || roleType == 3">
<view @click="scan" class="block-item">
<image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
<view class="block-item-box flex a-i-c ">
@@ -48,8 +48,7 @@
</view>
</view>
</view>
- <view class="block-item" @click="navigatorPage('/subPackage/user/clockIn/index')"
- v-if="roleType == 1 || roleType == 3">
+ <view class="block-item" @click="navigatorPage('/subPackage/user/clockIn/index')">
<image class="block-item-bg" src="/static/icon/nav-bg-05.png" mode="aspectFill" />
<view class="block-item-box flex a-i-c">
<u-icon name="/static/icon/nav-06.png" width="65rpx" height="65rpx"></u-icon>
@@ -59,8 +58,7 @@
</view>
</view>
</view>
- <view class="block-item" @click="navigatorPage('/subPackage/statistics/index')"
- v-if="roleType == 1 || roleType == 3">
+ <view class="block-item" @click="navigatorPage('/subPackage/statistics/index')">
<image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
<view class="block-item-box flex a-i-c">
<u-icon name="/static/icon/nav-12.png" width="65rpx" height="65rpx"></u-icon>
diff --git a/subPackage/house/houseNumber/siteInspect.vue b/subPackage/house/houseNumber/siteInspect.vue
index 1ab6db3..925cba6 100644
--- a/subPackage/house/houseNumber/siteInspect.vue
+++ b/subPackage/house/houseNumber/siteInspect.vue
@@ -56,18 +56,38 @@
</u-upload>
</view>
</view>
- </view>
- <!-- <view class="sign bgc-ff mt-20">
<view class="flex j-c-s-b a-i-c " @click="showSignature = true">
<view class="f-28">签名</view>
<u-icon name="arrow-right"></u-icon>
</view>
- <view class="bgc-ff" v-if="signatureUrl">
- <u-image :src="signatureUrl" width="70" height="70"></u-image>
+ <view v-if="signatureUrl">
+ <u-image :src="signatureUrl" width="70" height="70" @click="previewImg()"></u-image>
</view>
- </view> -->
- <footer-btn @click="showSignPopup"></footer-btn>
+ <!-- <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>
+
+ <footer-btn @click="sumitInfo"></footer-btn>
<u-popup mode="bottom" :show="showSignature" round="10" :closeable="true" @close="showSignature=false">
<view class="signture-popup">
@@ -121,7 +141,16 @@
questionList: [],
itemIndex: [],
patrolRecordVOList: [],
- count: 0
+ count: 0,
+ statusList: [{
+ name: "是",
+ id: 1
+ },
+ {
+ name: "否",
+ id: 2
+ }
+ ],
}
},
@@ -275,7 +304,7 @@
this.showSignature = false;
this.signatureUrl = data.data.link;
this.info.signaturePath = data.data.name;
- this.sumitInfo()
+ // this.sumitInfo()
}
}
})
@@ -307,7 +336,15 @@
}
})
})
+ },
+
+ previewImg() {
+ uni.previewImage({
+ urls: [this.signatureUrl],
+ current: this.signatureUrl
+ })
}
+
}
}
</script>
@@ -331,7 +368,7 @@
.content {
margin: 20rpx 0;
- padding: 0 30rpx 100rpx;
+ padding: 0 30rpx 150rpx;
}
.site-box {
diff --git a/subPackage/workbench/views/checkReform.vue b/subPackage/workbench/views/checkReform.vue
new file mode 100644
index 0000000..ce57058
--- /dev/null
+++ b/subPackage/workbench/views/checkReform.vue
@@ -0,0 +1,447 @@
+<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
+ } 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
+ }
+ ],
+
+ }
+ },
+ onLoad(option) {
+ this.info.houseCode = option.code;
+ this.getItem();
+ },
+
+ methods: {
+
+
+ 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 85d2f29..ebf551f 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -910,12 +910,14 @@
this.nineTypeIndex = e.indexs;
this.nineTypeValue = e.value[0].name;
this.form.nineType = e.value[0].value;
+ this.showNineTypePicker = false;
},
confirmFrontTypePicker(e) {
this.frontTypeIndex = e.indexs;
this.frontTypeValue = e.value[0].name;
this.form.frontType = e.value[0].value;
+ this.showFrontTypePicker = false;
},
async changeHandler(e) {
--
Gitblit v1.9.3