From afdc4f71240ff51dcf4e3b4cf5ce37208f6084b1 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Mon, 29 Jan 2024 18:33:56 +0800
Subject: [PATCH] 更新
---
pages/home/index.vue | 8
api/place/place.js | 8
pages.json | 9 +
subPackage/house/houseNumber/index.vue | 8
subPackage/workbench/views/cscj.vue | 120 ++++++++++++
common/setting.js | 8
subPackage/label/index.vue | 2
subPackage/house/houseNumber/siteInspect.vue | 318 +++++++++++++++++++++++++++++++++++
8 files changed, 464 insertions(+), 17 deletions(-)
diff --git a/api/place/place.js b/api/place/place.js
index b4af7c8..62efcac 100644
--- a/api/place/place.js
+++ b/api/place/place.js
@@ -48,4 +48,12 @@
method: 'GET',
params
})
+}
+
+export const getPlaceCheckItem = (params) => {
+ return http.request({
+ url: '/patrol/patrolGroup/getPatrolGroupTree',
+ method: 'GET',
+ params
+ })
}
\ No newline at end of file
diff --git a/common/setting.js b/common/setting.js
index ba1509f..1f08dc9 100644
--- a/common/setting.js
+++ b/common/setting.js
@@ -10,11 +10,11 @@
version: '2.0.0',
// 开发环境接口Url
// devUrl: 'http://z4042833u6.wicp.vip',
- // devUrl: 'http://192.168.0.110:9528',
- devUrl: 'https://srgdjczzxtpt.com:2080/api',
+ devUrl: 'http://192.168.0.101:9528',
+ // devUrl: 'https://srgdjczzxtpt.com:2080/api',
// devUrl: 'https://kt39592615.goho.co',
- minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
- // minioBaseUrl:"http://192.168.0.103:9528/",
+ // minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
+ // minioBaseUrl: "http://192.168.0.101:9528/",
// 数据中台接口url
dataCenterUrl: 'https://sk.hubeishuiyi.cn/services',
//洪水预报接口url
diff --git a/pages.json b/pages.json
index 68d5212..7c0e775 100644
--- a/pages.json
+++ b/pages.json
@@ -770,6 +770,15 @@
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
+ },
+ {
+ "path": "houseNumber/siteInspect",
+ "style": {
+ "navigationBarTitleText": "场所检查",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black"
+ }
}
]
},
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 5220718..9ed9e26 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">
+ <view class="block flex a-i-c j-c-s-b mb-20" v-if="roleType == 1 || roleType == 3 || !isLogin">
<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,7 +48,8 @@
</view>
</view>
</view>
- <view class="block-item" @click="navigatorPage('/subPackage/user/clockIn/index')">
+ <view class="block-item" @click="navigatorPage('/subPackage/user/clockIn/index')"
+ v-if="roleType == 1 || roleType == 3">
<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>
@@ -58,7 +59,8 @@
</view>
</view>
</view>
- <view class="block-item" @click="navigatorPage('/subPackage/statistics/index')">
+ <view class="block-item" @click="navigatorPage('/subPackage/statistics/index')"
+ v-if="roleType == 1 || roleType == 3">
<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/index.vue b/subPackage/house/houseNumber/index.vue
index 0223e1b..e4fef2c 100644
--- a/subPackage/house/houseNumber/index.vue
+++ b/subPackage/house/houseNumber/index.vue
@@ -76,7 +76,7 @@
<u-icon name="/static/icon/menu-02.png" size="30"></u-icon>
<text>场所采集</text>
</view>
- <view class="sl-box" @click="showPopup = true" v-if="isPolice">
+ <view class="sl-box" @close="showPopup=false" v-if="isPolice">
<u-icon name="/static/icon/menu-02.png" size="30"></u-icon>
<text>场所检查</text>
</view>
@@ -518,7 +518,12 @@
this.showPopup = false;
}
})
+ },
+
+ navToInspect() {
+ this.$u.func.globalNavigator(`siteInspect?code=${this.stdId}`)
}
+
},
}
</script>
@@ -583,6 +588,7 @@
flex: 1;
display: flex;
justify-content: center;
+ align-items: center;
text {
margin-left: 15rpx;
diff --git a/subPackage/house/houseNumber/siteInspect.vue b/subPackage/house/houseNumber/siteInspect.vue
new file mode 100644
index 0000000..e6390c8
--- /dev/null
+++ b/subPackage/house/houseNumber/siteInspect.vue
@@ -0,0 +1,318 @@
+<template>
+ <view class="wrap">
+ <u-collapse :value="itemIndex">
+ <u-collapse-item :title="item.title" :name="index" v-for="(item,index) in questionList">
+ <u-form :model="info" :rules="rules" ref="form">
+ <u-form-item labelWidth="170" :label="i.title" prop="gateStatus" v-for="(i,k) in item.children">
+ <view class="btn-group flex" style="margin-left:20rpx;">
+ <view class="value-item" @click="changeStatus(1,index,k)">
+ 存在
+ </view>
+ <view class="value-item" @click="changeStatus(2,index,k)">
+ 不存在
+ </view>
+ </view>
+ </u-form-item>
+
+ <!-- <u-form-item labelWidth="120" label="整改内容" prop="gateStatus">
+ <u-textarea v-model="info.remark" placeholder="请输入内容" placeholderClass="c-99 f-26"></u-textarea>
+ </u-form-item>
+ <u-form-item labelWidth="120" label="图片" prop="gateStatus">
+ <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>
+ </u-form-item> -->
+ </u-form>
+ </u-collapse-item>
+ </u-collapse>
+
+ <view class="content bgc-ff" v-if="false">
+
+
+ <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>
+ <!-- <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>
+ </view> -->
+
+
+
+
+
+ <footer-btn @click="sumitInfo"></footer-btn>
+
+
+ <u-popup mode="bottom" :show="showSignature" round="10" :closeable="true" @close="showSignature=false">
+ <view class="signture-popup">
+ <jushi-signature :settings="signatureSettings" @change="signatureChange"></jushi-signature>
+ </view>
+ </u-popup>
+
+ </view>
+</template>
+
+<script>
+ import uploadMixin from "@/mixin/uploadMixin";
+ import {
+ addPlaceCheck,
+ 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: 2
+ },
+ {
+ text: "不存在",
+ value: 1
+ },
+ ],
+
+ questionList: [],
+ itenIndex: []
+
+ }
+ },
+ onLoad(option) {
+ // this.info.houseCode = option.code;
+ this.getItem();
+ },
+
+ methods: {
+
+
+ getItem() {
+ getPlaceCheckItem().then(res => {
+ let data = res.data;
+ this.questionList = res.data;
+ let arr = []
+ for (let i = 0, ii = data.length; i < ii; i++) {
+ arr.push(i);
+ }
+ this.itemIndex = arr;
+ })
+ },
+
+
+
+ changeStatus(value, fIndex, cIndex) {
+ this.info.status = value;
+
+ },
+
+
+ signatureChange(e) {
+ // this.signatureUrl = e;
+ this.uploadSignImg(e)
+ },
+
+ 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;
+ }
+ }
+ })
+ },
+
+
+ sumitInfo() {
+ if (this.form.images.length > 0) {
+ let urls = []
+ this.form.images.forEach(e => {
+ urls.push(e.name)
+ })
+ this.info.imageUrls = urls.join(",")
+ }
+ addPlaceCheck(this.info).then(res => {
+ uni.showToast({
+ icon: 'success',
+ title: '提交成功',
+ success() {
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 1000)
+ }
+ })
+ })
+ }
+ }
+ }
+</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 30rpx;
+ padding: 0 30rpx;
+ }
+
+ .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;
+ }
+
+ .content {
+ padding: 0 20rpx;
+ }
+
+ .signture-popup {
+ padding-bottom: 20rpx;
+ }
+
+ .sign {
+ padding: 30rpx;
+ // margin: 0 30rpx;
+ }
+
+ .value-item {
+ padding: 0 40rpx;
+ // background-color: #ffffff;
+ border: 2rpx solid #333333;
+ height: 70rpx;
+ line-height: 70rpx;
+ box-sizing: border-box;
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/label/index.vue b/subPackage/label/index.vue
index 9f6da14..7622a04 100644
--- a/subPackage/label/index.vue
+++ b/subPackage/label/index.vue
@@ -126,7 +126,7 @@
let siteInfo = uni.getStorageSync("siteInfo");
this.curSiteInfo = siteInfo;
- this.isNine = siteInfo.isNine;
+ this.isNine = siteInfo.isNine || 2;
if (siteInfo.isNine == 1) {
for (let i of this.navList[1]) {
if (i.id.includes(siteInfo.categoryList[0].categoryNo)) {
diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
index c4b2f4f..8db7114 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -12,9 +12,6 @@
<view class="box-title">
<box-title title="基础信息"></box-title>
</view>
-
-
-
<u-form-item class="form-item" labelWidth="100" label="场所名称:" :required="isRequiredPlace"
:disabled="isDisabled" prop="placeName">
<u--input v-if="!currentId" border="none" v-model="form.placeName" placeholder="请输入">
@@ -40,6 +37,31 @@
<view class="f-30" v-if="currentId">
{{form.isNine == 1?"是":"否"}}
</view>
+ </u-form-item>
+ <u-form-item v-if="form.isNine == 1" @click="showNineTypePicker = true" class="form-item"
+ labelWidth="100" label="九小场所类型:" :required="isRequired" :disabled="isDisabled" prop="nineType">
+ <u-input border="none" v-model="nineTypeValue" disabled disabledColor="#ffffff"
+ placeholder="请选择">
+ </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-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">
+ </u-radio>
+ </u-radio-group>
+ <view class="f-30" v-if="currentId">
+ {{form.isFront == 1?"是":"否"}}
+ </view>
+ </u-form-item>
+ <u-form-item v-if="form.isFront == 1" @click="showFrontTypePicker = true" class="form-item"
+ labelWidth="100" label="阵地类型:" :required="isRequired" :disabled="isDisabled" prop="frontType">
+ <u-input border="none" v-model="frontTypeValue" disabled disabledColor="#ffffff"
+ placeholder="请选择">
+ </u-input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<!-- <view v-if="showLabelList.length" class="label" style="border-bottom:1px solid eff1f3;">
<view v-for="(item,index) in showLabelList" :key="index" class="activeLabel">
@@ -179,9 +201,13 @@
<footer-btn @click="submit" v-if="!currentId" />
- <u-picker :show="showPicker" :defaultIndex="defaultIndex" ref="uPicker" keyName="name" :loading="pickerLoading"
- :columns="pickColumns" @change="changeHandler" @confirm="confirmPicker"
- @cancel="showPicker = false"></u-picker>
+ <u-picker :show="showNineTypePicker" :defaultIndex="nineTypeIndex" ref="uPicker" keyName="name"
+ :loading="pickerLoading" :columns="[nineTypeList]" @confirm="confirmNineTypePicker"
+ @cancel="showNineTypePicker = false"></u-picker>
+
+ <u-picker :show="showFrontTypePicker" :defaultIndex="frontTypeIndex" ref="uPicker" keyName="name"
+ :loading="pickerLoading" :columns="[frontTypeList]" @confirm="confirmFrontTypePicker"
+ @cancel="showFrontTypePicker = false"></u-picker>
<u-picker :show="isShowCatePicker" :defaultIndex="categoryIndex" ref="catePicker" keyName="categoryName"
@@ -215,6 +241,9 @@
import {
minioBaseUrl
} from "../../../common/setting";
+ import {
+ bizDictionary
+ } from '@/api/system/dict.js'
export default {
mixins: [uploadMixin],
components: {
@@ -245,7 +274,10 @@
lat: '',
lng: '',
location: '',
- isNine: ""
+ isNine: "",
+ isFront: "",
+ frontType: "",
+ nineType: ""
},
rules: {
// 'buildingCode': {
@@ -429,6 +461,16 @@
id: 2
}
],
+ nineTypeList: [], //九小类型
+ frontTypeList: [], //阵地
+ nineTypeIndex: [0],
+ frontTypeIndex: [0],
+ showNineTypePicker: false,
+ showFrontTypePicker: false,
+ nineTypeValue: "",
+ frontTypeValue: ""
+
+
}
},
created() {
@@ -460,6 +502,7 @@
})
}
this.getCategory();
+ this.getAllBizDict();
},
watch: {
@@ -528,6 +571,28 @@
// })
// })
// },
+
+
+ async getAllBizDict() {
+ // 获取九小场所类型
+ await this.getBizDict('nineType', this.nineTypeList)
+ // 获取阵地
+ await this.getBizDict('frontType', this.frontTypeList)
+ },
+
+ // 获取业务字典
+ async getBizDict(code, list) {
+ const param = {
+ code: code
+ }
+ const res = await bizDictionary(param)
+ res.data.forEach(e => {
+ list.push({
+ name: e.dictValue,
+ value: Number(e.dictKey)
+ })
+ })
+ },
navTo(type) {
if (type == 1) {
@@ -664,6 +729,25 @@
this.form.images = []
}
}
+
+ if (key == "isNine") {
+ let {
+ index,
+ name
+ } = this.$getIndex(this.nineTypeList, data.nineType, "value", "name");
+ this.nineTypeIndex = index;
+ this.nineTypeValue = name;
+ }
+
+ if (key == "isFrontType") {
+ let {
+ index,
+ name
+ } = this.$getIndex(this.frontTypeList, data.frontType, "value", "name");
+ this.frontTypeIndex = index;
+ this.frontTypeValue = name;
+ }
+
})
this.form.jwd = `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`
@@ -708,7 +792,6 @@
}
})
})
-
})
},
@@ -726,6 +809,15 @@
}
this.form.roleName = uni.getStorageSync("activeRole").roleName;
+ if (this.form.isNine == 2 && this.form.nineType) {
+ this.form.nineType = "";
+ }
+ if (this.form.isFront == 2 && this.form.frontType) {
+ this.form.frontType = "";
+ }
+
+ delete this.form.images;
+
add(this.form).then(res => {
uni.showToast({
icon: 'success',
@@ -814,6 +906,18 @@
this.showPicker = false
},
+ confirmNineTypePicker(e) {
+ this.nineTypeIndex = e.indexs;
+ this.nineTypeValue = e.value[0].name;
+ this.form.nineType = e.value[0].value;
+ },
+
+ confirmFrontTypePicker(e) {
+ this.frontTypeIndex = e.indexs;
+ this.frontTypeValue = e.value[0].name;
+ this.form.frontType = e.value[0].value;
+ },
+
async changeHandler(e) {
const {
columnIndex,
--
Gitblit v1.9.3