From 2cfa2dd91631cdc51456301cfd2a804a693957d7 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Tue, 07 Nov 2023 18:01:27 +0800
Subject: [PATCH] 首页标签报事入口,新增旅店安全自查,取保候审页面
---
subPackage/label/released.vue | 596 ++++++++++++++++++++++
pages/home/index.vue | 6
pages.json | 42 +
subPackage/label/index.vue | 207 +++++++
subPackage/label/hotel.vue | 666 +++++++++++++++++++++++++
subPackage/label/form.vue | 33 +
6 files changed, 1,547 insertions(+), 3 deletions(-)
diff --git a/pages.json b/pages.json
index e888d88..51aedf2 100644
--- a/pages.json
+++ b/pages.json
@@ -108,6 +108,48 @@
]
},
+ //标签
+ {
+ "root": "subPackage/label",
+ "pages": [
+ {
+ "path": "index",
+ "style": {
+ "navigationBarTitleText": "标签事件",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#4586fe",
+ "navigationBarTextStyle": "white"
+ }
+ },
+ {
+ "path": "hotel",
+ "style": {
+ "navigationBarTitleText": "旅馆安全自查",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#4586fe",
+ "navigationBarTextStyle": "white"
+ }
+ },{
+ "path": "released",
+ "style": {
+ "navigationBarTitleText": "取保候审",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#4586fe",
+ "navigationBarTextStyle": "white"
+ }
+ },
+ {
+ "path": "form",
+ "style": {
+ "navigationBarTitleText": "大金店报事",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#4586fe",
+ "navigationBarTextStyle": "white"
+ }
+ }
+ ]
+ },
+
//工作台
{
"root": "subPackage/workbench",
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 1389d9d..1553d8e 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -177,8 +177,8 @@
],
cellList: [{
icon: "/static/icon/nav-01.png",
- text: "扫一扫",
- path: ''
+ text: "标签报事",
+ path: '/subPackage/label/index'
},
{
icon: "/static/icon/nav-02.png",
@@ -278,7 +278,7 @@
// style: {
// background: 'linear-gradient(137deg, #FFF4F3 0%, rgba(255,244,243,0) 100%)',
// }
- // },
+ // }
],
taskList: [{
icon: "/static/icon/cell-01.png",
diff --git a/subPackage/label/form.vue b/subPackage/label/form.vue
new file mode 100644
index 0000000..89e911e
--- /dev/null
+++ b/subPackage/label/form.vue
@@ -0,0 +1,33 @@
+<template>
+</template>
+
+<script>
+ export default {
+ data(){
+ return{
+
+ }
+ },
+ onLoad(option) {
+ if(option.type != 1){
+ uni.setNavigationBarTitle({title:this.setTitle(type)})
+ }
+
+ },
+ methods:{
+ setTitle(type){
+ if(type == 2){
+ return "二手车交易"
+ }else if (type == 3){
+ return "二手手机维修"
+ }
+
+
+
+ }
+ }
+ }
+</script>
+
+<style>
+</style>
\ No newline at end of file
diff --git a/subPackage/label/hotel.vue b/subPackage/label/hotel.vue
new file mode 100644
index 0000000..877f2a2
--- /dev/null
+++ b/subPackage/label/hotel.vue
@@ -0,0 +1,666 @@
+<template>
+ <view class="container">
+ <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
+ <view class="box-title">
+ <box-title title="基础信息"></box-title>
+ </view>
+ <view class="item">
+ <!-- <u-form-item @click="showPicker = true" class="form-item" labelWidth="100" label="社区名称:"
+ :required="isRequired" :disabled="isDisabled" prop="buildingCode">
+ <u--input border="none" disabledColor="#ffffff" v-model="form.building" placeholder="请选择">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item> -->
+
+ <u-form-item class="form-item" labelWidth="100" label="社区名称:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请输入"></u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" label="酒店名称:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请输入"></u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" label="自查人姓名:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请输入"></u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" label="自查人手机:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请输入"></u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" label="自查位置:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请输入"></u--input>
+ </u-form-item>
+
+ <u-form-item @click="showPicker = true" class="form-item" labelWidth="100" label="灭火器数量:"
+ :required="isRequired" :disabled="isDisabled" prop="buildingCode">
+ <u--input border="none" disabledColor="#ffffff" v-model="form.building" placeholder="请选择">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" label="灭火器状态:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请选择"></u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ </view>
+
+
+ <view class="box-title">
+ <box-title title="灭火器日期(要拍到限用日期)"></box-title>
+ </view>
+ <view class="item pic mb-20">
+ <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
+ :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
+ </u-upload>
+ </view>
+ <view class="item">
+ <u-form-item class="form-item" labelWidth="100" label="安全通道有无:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请输入"></u--input>
+ </u-form-item>
+ <u-form-item @click="showPicker = true" class="form-item" labelWidth="100" label="安全通道状态:"
+ :required="isRequired" :disabled="isDisabled" prop="buildingCode">
+ <u--input border="none" disabledColor="#ffffff" v-model="form.building" placeholder="请选择">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ </view>
+
+
+ <view class="box-title">
+ <box-title title="安全通道图片(拍到门和指示箭头)"></box-title>
+ </view>
+ <view class="item pic mb-20">
+ <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
+ :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
+ </u-upload>
+ </view>
+ <view class="item ">
+ <u-form-item class="form-item" labelWidth="100" label="技防设施有无:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请输入"></u--input>
+ </u-form-item>
+ <u-form-item @click="showPicker = true" class="form-item" labelWidth="100" label="技防设施名称:"
+ :required="isRequired" :disabled="isDisabled" prop="buildingCode">
+ <u--input border="none" disabledColor="#ffffff" v-model="form.building" placeholder="请选择">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ </view>
+
+ <view class="box-title">
+ <box-title title="技防设施(拍到视频画面)"></box-title>
+ </view>
+ <view class="item pic">
+ <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
+ :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
+ </u-upload>
+ </view>
+ <view class="box-title">
+ <box-title title="未成年人入住登记本照片上传"></box-title>
+ </view>
+ <view class="item pic mb-20">
+ <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
+ :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
+ </u-upload>
+ </view>
+ <u-form-item class="form-item" labelWidth="100" label="是否实名登记:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请输入"></u--input>
+ </u-form-item>
+
+
+ </u-form>
+
+
+
+
+
+
+
+ <view class="bottom">
+ <view class="btn">
+ <u-button @click="submit" type="primary" text="提交"></u-button>
+ </view>
+ </view>
+
+
+
+ <uni-popup class="citys_win popup_win" ref="uniPopup" type="bottom">
+ <wyh-tree-select :items="labelList" title="标签选择" :showNav="true" defaultActiveColor="#4586fe"
+ :activeIds="activeIds" @clickItem="labelClick" :showCancel="false" :showConfirm="false">
+ </wyh-tree-select>
+ </uni-popup>
+
+
+ <u-picker :show="showPicker" :defaultIndex="defaultIndex" ref="uPicker" keyName="name" :loading="pickerLoading"
+ :columns="pickColumns" @change="changeHandler" @confirm="confirmPicker"
+ @cancel="showPicker = false"></u-picker>
+
+
+ </view>
+</template>
+
+<script>
+ import uploadMixin from "@/mixin/uploadMixin";
+ import lineItem from "@/subPackage/workbench/components/lineItem.vue"
+ import {
+ getLabelList
+ } from "@/api/label/label";
+ import {
+ getDoorplateAddressDetail,
+ getDoorplateAddressList
+ } from "@/api/doorplateAddress/doorplateAddress";
+ import {
+ add
+ } from "@/api/place/place";
+ export default {
+ mixins: [uploadMixin],
+ components: {
+ lineItem
+ },
+ data() {
+ return {
+ isRequired: false,
+ isRequiredPlace: true,
+ isDisabled: true,
+ showPicker: false,
+ pickerLoading: false,
+ pickColumns: [],
+ defaultIndex: [0, 0, 0, 0, 0],
+
+ selectValue: [],
+
+ form: {
+ buildingCode: "",
+ label: "",
+ remark: "",
+ imageUrls: "",
+ },
+ rules: {
+ 'buildingCode': {
+ type: 'string',
+ required: true,
+ message: '请选择楼栋',
+ trigger: ['blur', 'change']
+ },
+ 'placeName': {
+ type: 'string',
+ required: true,
+ message: '请输入场所名称',
+ trigger: ['blur', 'change']
+ },
+ 'label': {
+ type: 'string',
+ required: true,
+ message: '请选择标签',
+ trigger: ['blur', 'change'],
+ },
+ 'username': {
+ type: 'string',
+ required: true,
+ message: '请输入场所负责人',
+ trigger: ['blur', 'change'],
+ },
+ 'phone': {
+ type: 'string',
+ required: true,
+ message: '请输入手机号',
+ trigger: ['blur', 'change'],
+ },
+ },
+
+ labelList: [{
+ text: '全部标签',
+ children: [],
+ dot: false
+ }, ],
+
+ comprehensiveData: {
+ basic: [{
+ label: "社区名称",
+ value: "暂无数据"
+ },
+ {
+ label: "网格名称",
+ value: "暂无数据"
+ },
+ {
+ label: "网格员",
+ value: "暂无数据"
+ },
+ {
+ label: "联系电话",
+ value: "暂无数据"
+ }
+ ],
+ scene: [{
+ label: "场所照片",
+ value: "",
+ useSlot: "pic",
+ },
+ {
+ label: "采集人",
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ value: "未完善"
+ },
+ {
+ label: "场所负责人",
+ value: "未完善",
+ },
+ {
+ label: "采集人",
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ value: "未完善",
+ },
+ {
+ label: "历史事件",
+ value: "未完善",
+ }
+ ],
+ },
+ publicData: {
+ basic: [{
+ label: "公安局",
+ value: "暂无数据"
+ },
+ {
+ label: "派出所",
+ value: "暂无数据"
+ },
+ {
+ label: "辖区民警",
+ value: "暂无数据"
+ },
+ {
+ label: "联系电话",
+ value: "暂无数据"
+ }
+ ],
+ scene: [{
+ label: "消防照片",
+ value: "",
+ useSlot: "pic",
+ },
+ {
+ label: "采集人",
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ value: "未完善"
+ },
+ {
+ label: "消防负责人",
+ value: "未完善",
+ },
+ {
+ label: "采集人",
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ value: "未完善",
+ },
+ {
+ label: "历史事件",
+ value: "未完善",
+ }
+ ],
+ },
+
+ activeIds: [],
+ showLabelList: [],
+
+ stdId: "",
+ }
+ },
+ watch: {
+ activeIds: {
+ handler(newVal) {
+ this.form.label = newVal.join(",")
+ }
+ },
+ "form.buildingCode": {
+ handler(newVal) {
+ console.log(newVal)
+ }
+ }
+
+ },
+
+ created() {
+ this.buildColumn()
+ },
+ mounted() {
+
+ },
+ options: {
+ styleIsolation: 'shared', // 解除样式隔离
+ },
+ onLoad(option) {
+ this.stdId = option.stdId
+ console.log(this.stdId, "----------")
+ if (this.stdId) {
+ this.getBuildingDetail()
+ }
+
+
+ },
+ onShow() {
+ this.getLabel()
+ this.getLocation()
+ },
+ methods: {
+
+ getBuildingDetail(params = {}) {
+ getDoorplateAddressDetail(Object.assign(params, {
+ stdId: this.stdId
+ })).then(res => {
+ let data = res.data
+ this.form.buildingCode = data.buildingCode
+
+ let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName,
+ data.buildingName
+ ]
+ let arr = buildingNameArr.filter(e => {
+ return e != null || e != ''
+ })
+ this.form.building = arr.join("")
+ })
+ },
+
+ //表单提交
+ submit() {
+ const that = this
+ this.$refs.form.validate().then(valid => {
+ if (valid) {
+ if (this.form.images.length > 0) {
+ let urls = []
+ this.form.images.forEach(e => {
+ urls.push(e.name)
+ })
+ this.form.imageUrls = urls.join(",")
+ }
+ add(this.form).then(res => {
+ uni.showToast({
+ icon: 'success',
+ title: '提交成功',
+ success() {
+ setTimeout(() => {
+ that.$u.func.globalNavigator(
+ "/pages/home/index", "switchTab")
+ }, 1000)
+ }
+ })
+ })
+ }
+ })
+
+ },
+
+ async buildColumn() {
+
+ //设置街道
+ const townStreet = await this.getDoorplateAddressList(null, "townStreet")
+ this.setColumn(townStreet, 0)
+ //设置社区
+ const nei = await this.getDoorplateAddressList(townStreet[0].code, "nei")
+ this.setColumn(nei, 1)
+ //设置路
+ const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu")
+ this.setColumn(streetRu, 2)
+ //设置地区
+ const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
+ this.setColumn(district, 3)
+ //设置楼栋
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
+ this.setColumn(building, 4)
+ },
+
+ setColumn(data, index) {
+ this.$set(this.pickColumns, index, data)
+ },
+
+ getLocation() {
+ const that = this
+ uni.getLocation({
+ type: 'wgs84', // 坐标系类型
+ success: function(res) {
+ var latitude = res.latitude; // 维度
+ var longitude = res.longitude; // 经度
+
+ that.form.lng = longitude
+ that.form.lat = latitude
+
+ that.form.jwd = longitude + "," + latitude
+ },
+ fail: function(res) {
+ console.log('获取定位失败:' + res.errMsg);
+ }
+ });
+ },
+
+ async getDoorplateAddressList(code, type) {
+ const res = await getDoorplateAddressList(code, type)
+ return res.data
+ },
+
+ confirmPicker(e) {
+
+ if (e.value[4]) {
+ this.selectValue = e.value
+
+ let arr = this.selectValue.map(e => e.name)
+ this.form.building = arr.join("")
+
+ this.form.buildingCode = e.value[4].code
+ }
+ this.showPicker = false
+ },
+
+ async changeHandler(e) {
+ const {
+ columnIndex,
+ index,
+ // 微信小程序无法将picker实例传出来,只能通过ref操作
+ picker = this.$refs.uPicker
+ } = e
+ let item = e.values[columnIndex][index]
+ //街道
+ if (columnIndex === 0) {
+ //获取社区列表
+ const nei = await this.getDoorplateAddressList(item.code, "nei")
+ picker.setColumnValues(1, nei)
+
+ const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu")
+ picker.setColumnValues(2, streetRu)
+
+ const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
+ picker.setColumnValues(3, district)
+
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
+ picker.setColumnValues(4, building)
+ }
+
+ if (columnIndex === 1) {
+ const streetRu = await this.getDoorplateAddressList(item.code, "streetRu")
+ picker.setColumnValues(2, streetRu)
+
+ const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
+ picker.setColumnValues(3, district)
+
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
+ picker.setColumnValues(4, building)
+ }
+
+ if (columnIndex === 2) {
+
+ const district = await this.getDoorplateAddressList(item.code, "district")
+ picker.setColumnValues(3, district)
+
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
+ picker.setColumnValues(4, building)
+ }
+
+ if (columnIndex === 3) {
+ const building = await this.getDoorplateAddressList(item.code, "building")
+ picker.setColumnValues(4, building)
+ }
+
+ },
+
+ //弹出层打开
+ popup() {
+ this.$refs.uniPopup.open()
+ },
+
+ getLabel() {
+ getLabelList({
+ size: -1
+ }).then(res => {
+ let data = res.data.records
+ data.sort((a, b) => a.sort - b.sort)
+
+ data.forEach(label => {
+ this.labelList[0].children.push({
+ id: label.id,
+ text: label.labelName
+ })
+ })
+ })
+ },
+
+ labelClick(item) {
+
+ //判断label是否已在
+ const label = this.showLabelList.find(e => e.id == item.id)
+ if (label) {
+ //在,去掉
+ this.showLabelList = this.showLabelList.filter(e => e.id != label.id)
+ this.activeIds = this.activeIds.filter(e => e != label.id)
+ } else {
+ //不在,添加
+ item.isClose = false
+ this.showLabelList.push(item)
+ this.activeIds.push(item.id)
+ }
+
+ this.showLabelList.sort((a, b) => a.sort - b.sort)
+
+ },
+ delTag(label) {
+ label.isClose = true
+ this.showLabelList = this.showLabelList.filter(e => e.id != label.id)
+ this.activeIds = this.activeIds.filter(e => e != label.id)
+
+ }
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+ .container {
+ position: relative;
+ width: 100%;
+ // height: 100%;
+ display: flex;
+ flex-direction: column;
+ background: #F9F9FA;
+
+ .box-title {
+ padding: 10px 0;
+
+ .title-more {
+ display: flex;
+ align-items: center;
+ height: 100%;
+
+ .item {
+ width: 50rpx;
+ height: 40rpx;
+ color: #ffffff;
+ padding: 6rpx;
+ font-size: 2rpx;
+ text-align: center;
+ line-height: 20px;
+ }
+
+ }
+ }
+
+ .item {
+
+ .form-item {
+ background-color: #ffffff;
+ padding: 2rpx 10px;
+ border-bottom: 0.1px solid #eff1f3;
+ }
+
+ .label {
+ padding: 10rpx 30rpx;
+ display: flex;
+ background-color: #ffffff;
+ flex-wrap: wrap;
+
+ .activeLabel {
+ // width: 80rpx;
+ margin-left: 10rpx;
+ margin-top: 10rpx
+ }
+ }
+
+
+
+ }
+
+ .pic {
+ background-color: #ffffff;
+ padding: 40rpx 30rpx;
+ }
+
+ .bottom {
+ padding: 20rpx;
+ background-color: #ffffff;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .btn {
+ width: calc(100% - 40rpx);
+ }
+ }
+ }
+
+ /deep/ .u-form-item {
+ background-color: #ffffff;
+ padding: 2rpx 10px;
+ border-bottom: 1px solid #eff1f3;
+ }
+
+ .red {
+ background-color: red;
+ border-radius: 10rpx 0rpx 0rpx 10rpx;
+ }
+
+ .orange {
+ background-color: orange;
+ }
+
+ .green {
+ background-color: green;
+ border-radius: 0rpx 10rpx 10rpx 0rpx;
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/label/index.vue b/subPackage/label/index.vue
new file mode 100644
index 0000000..b8b9552
--- /dev/null
+++ b/subPackage/label/index.vue
@@ -0,0 +1,207 @@
+<template>
+ <view class="">
+ <u-navbar height="48" :autoBack="true" safeAreaInsetTop placeholder bgColor="transparent" leftIconColor="#fff">
+ </u-navbar>
+ <view class="top">
+ <image class="top-img" src="/static/img/repair-bg.png" mode="aspectFill"></image>
+ </view>
+
+ <view class="container">
+ <view class="c-ff f-36">请选择您需要的服务</view>
+ <view class="serve-box bgc-ff mb-20 flex j-c-s-b a-i-c">
+ <view class="flex a-i-c">
+ <u-icon name="/static/icon/nav-09.png" width="91rpx" height="70rpx"></u-icon>
+ <view class="flex f-d-c ml-40">
+ <text class="f-36">总申请</text>
+ <view class="flex a-i-c">
+ <text class="f-48 c-blue fw mr-6">50</text>
+ <text class="f-24 c-99">件</text>
+ </view>
+ </view>
+ </view>
+ <view class="flex a-i-c">
+ <u-icon name="/static/icon/nav-10.png" width="91rpx" height="70rpx"></u-icon>
+ <view class="flex f-d-c ml-40">
+ <text class="f-36">已处理</text>
+ <view class="flex a-i-c">
+ <text class="f-48 c-green fw mr-6">50</text>
+ <text class="f-24 c-99">件</text>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <view class="site-box bgc-ff flex">
+ <view class="flex a-i-c">
+ <u-icon name="map-fill" color="#AAAAAA"></u-icon>
+ <text class="f-28 c-aa ml-20">当前小区:</text>
+ </view>
+
+ <text class="address f-28">万达华府26栋1903室 万达华府26栋1903室</text>
+ </view>
+
+ <view class="nav flex flex-wrap j-c-s-b">
+
+ <view class="nav-item" v-for="(i,k) in navList" :key="k" @click="navTo(i.path,k)">
+ <image class="nav-item-bg" :src="i.bgImg" mode="aspectFill"></image>
+ <view class="nav-item-inner flex f-d-c">
+ <text class="f-32 mb-30">{{i.title}}</text>
+ <button class="item-btn" :style="{backgroundColor:i.background}">立即上报</button>
+ </view>
+ </view>
+
+
+ </view>
+ </view>
+
+ </view>
+
+</template>
+
+<script>
+ export default {
+ data(){
+ return {
+ navList:[
+ {
+ title:"旅馆安全",
+ bgImg:"/static/icon/nav-bg-06.png",
+ path:"hotel",
+ background:"#63C875"
+ },
+ {
+ title:"取保候审",
+ bgImg:"/static/icon/nav-bg-07.png",
+ path:"released",
+ background:"#4D98E2"
+ },
+ {
+ title:"打金店",
+ bgImg:"/static/icon/nav-bg-08.png",
+ path:"form",
+ background:"#EC7E51"
+ },
+ {
+ title:"二手车交易",
+ bgImg:"/static/icon/nav-bg-09.png",
+ path:"form",
+ background:"#F4B862"
+ },
+ {
+ title:"二手手机维修",
+ bgImg:"/static/icon/nav-bg-09.png",
+ path:"form",
+ background:"#F4B862"
+ },
+
+ ]
+ }
+ },
+ methods:{
+ navTo(path,index){
+ let type = 1;
+ if(index == 2){
+ type == 1
+ }else if (index == 3){
+ type = 2
+ }else {
+ type = 3
+ }
+
+ this.$u.func.globalNavigator(`${path}?type=${type}`, "navTo")
+
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ page{
+ width:100%;
+ height:100%;
+ }
+ .top{
+ width:100%;
+ height:659rpx;
+ background: linear-gradient(180deg, #017BFC 0%, rgba(1,123,252,0) 100%);
+ position: fixed;
+ top:0;
+ left:0;
+ .top-img{
+ width:100%;
+ height:659rpx;
+ }
+ }
+ .container{
+ width:100%;
+ padding: 0 30rpx;
+ position: fixed;
+ box-sizing: border-box;
+ top:130rpx;
+ left:0;
+ z-index: 100;
+ .serve-box{
+ width:100%;
+ height:213rpx;
+ border-radius: 8rpx;
+ margin-top:30rpx;
+ padding: 0 60rpx 0 40rpx;
+ box-sizing: border-box;
+ }
+ .f-48{
+ font-size:48rpx;
+ }
+ .c-blue{
+ color:#677CF8;
+
+ }
+ .c-green{
+ color:#30D17C;
+ }
+ .ml-40{
+ margin-left:40rpx;
+ }
+ .site-box{
+ width:100%;
+ padding:30rpx;
+ box-sizing: border-box;
+ border-radius: 4rpx;
+ .c-aa{
+ color:#aaa;
+ }
+ .address{
+ width:60%;
+ margin-left:25rpx;
+ }
+ }
+ .nav{
+ width:100%;
+ .nav-item,.nav-item-bg,.nav-item-inner{
+ width:330rpx;
+ height:167rpx;
+ }
+ .nav-item{
+ position: relative;
+ margin-top:30rpx;
+ }
+ .nav-item-inner{
+ padding:30rpx 30rpx 0;
+ position: absolute;
+ top:0;
+ left:0;
+
+ }
+ .item-btn{
+ width:125rpx;
+ height:42rpx;
+ line-height: 42rpx;
+ border-radius: 20rpx;
+ color:#fff;
+ font-size:22rpx;
+ padding:0;
+ margin:0;
+ }
+ }
+
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/label/released.vue b/subPackage/label/released.vue
new file mode 100644
index 0000000..921721e
--- /dev/null
+++ b/subPackage/label/released.vue
@@ -0,0 +1,596 @@
+<template>
+ <view class="container">
+ <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
+ <view class="box-title">
+ <box-title title="基础信息"></box-title>
+ </view>
+ <view class="item">
+ <!-- <u-form-item @click="showPicker = true" class="form-item" labelWidth="100" label="社区名称:"
+ :required="isRequired" :disabled="isDisabled" prop="buildingCode">
+ <u--input border="none" disabledColor="#ffffff" v-model="form.building" placeholder="请选择">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item> -->
+
+ <u-form-item class="form-item" labelWidth="100" label="姓名:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请输入"></u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" label="手机号:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请输入"></u--input>
+ </u-form-item>
+ </view>
+
+
+ <view class="item">
+ <u-form-item class="form-item" labelWidth="100" label="申请名称:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请输入"></u--input>
+ </u-form-item>
+ <u-form-item @click="showPicker = true" class="form-item" labelWidth="100" label="申请时间:"
+ :required="isRequiredPlace" :disabled="isDisabled" prop="buildingCode">
+ <u--input border="none" disabledColor="#ffffff" v-model="form.building" placeholder="请选择">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item @click="showPicker = true" class="form-item" labelWidth="100" label="申请位置:"
+ :required="isRequiredPlace" :disabled="isDisabled" prop="buildingCode">
+ <u--input border="none" disabledColor="#ffffff" v-model="form.building" placeholder="请选择">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ </view>
+
+
+ <view class="box-title">
+ <box-title title="位置图片"></box-title>
+ </view>
+ <view class="item pic mb-20">
+ <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
+ :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
+ </u-upload>
+ </view>
+ </u-form>
+
+ <view class="bottom">
+ <view class="btn">
+ <u-button @click="submit" type="primary" text="提交"></u-button>
+ </view>
+ </view>
+
+
+
+ <uni-popup class="citys_win popup_win" ref="uniPopup" type="bottom">
+ <wyh-tree-select :items="labelList" title="标签选择" :showNav="true" defaultActiveColor="#4586fe"
+ :activeIds="activeIds" @clickItem="labelClick" :showCancel="false" :showConfirm="false">
+ </wyh-tree-select>
+ </uni-popup>
+
+
+ <u-picker :show="showPicker" :defaultIndex="defaultIndex" ref="uPicker" keyName="name" :loading="pickerLoading"
+ :columns="pickColumns" @change="changeHandler" @confirm="confirmPicker"
+ @cancel="showPicker = false"></u-picker>
+
+
+ </view>
+</template>
+
+<script>
+ import uploadMixin from "@/mixin/uploadMixin";
+ import lineItem from "@/subPackage/workbench/components/lineItem.vue"
+ import {
+ getLabelList
+ } from "@/api/label/label";
+ import {
+ getDoorplateAddressDetail,
+ getDoorplateAddressList
+ } from "@/api/doorplateAddress/doorplateAddress";
+ import {
+ add
+ } from "@/api/place/place";
+ export default {
+ mixins: [uploadMixin],
+ components: {
+ lineItem
+ },
+ data() {
+ return {
+ isRequired: false,
+ isRequiredPlace: true,
+ isDisabled: true,
+ showPicker: false,
+ pickerLoading: false,
+ pickColumns: [],
+ defaultIndex: [0, 0, 0, 0, 0],
+
+ selectValue: [],
+
+ form: {
+ buildingCode: "",
+ label: "",
+ remark: "",
+ imageUrls: "",
+ },
+ rules: {
+ 'buildingCode': {
+ type: 'string',
+ required: true,
+ message: '请选择楼栋',
+ trigger: ['blur', 'change']
+ },
+ 'placeName': {
+ type: 'string',
+ required: true,
+ message: '请输入场所名称',
+ trigger: ['blur', 'change']
+ },
+ 'label': {
+ type: 'string',
+ required: true,
+ message: '请选择标签',
+ trigger: ['blur', 'change'],
+ },
+ 'username': {
+ type: 'string',
+ required: true,
+ message: '请输入场所负责人',
+ trigger: ['blur', 'change'],
+ },
+ 'phone': {
+ type: 'string',
+ required: true,
+ message: '请输入手机号',
+ trigger: ['blur', 'change'],
+ },
+ },
+
+ labelList: [{
+ text: '全部标签',
+ children: [],
+ dot: false
+ }, ],
+
+ comprehensiveData: {
+ basic: [{
+ label: "社区名称",
+ value: "暂无数据"
+ },
+ {
+ label: "网格名称",
+ value: "暂无数据"
+ },
+ {
+ label: "网格员",
+ value: "暂无数据"
+ },
+ {
+ label: "联系电话",
+ value: "暂无数据"
+ }
+ ],
+ scene: [{
+ label: "场所照片",
+ value: "",
+ useSlot: "pic",
+ },
+ {
+ label: "采集人",
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ value: "未完善"
+ },
+ {
+ label: "场所负责人",
+ value: "未完善",
+ },
+ {
+ label: "采集人",
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ value: "未完善",
+ },
+ {
+ label: "历史事件",
+ value: "未完善",
+ }
+ ],
+ },
+ publicData: {
+ basic: [{
+ label: "公安局",
+ value: "暂无数据"
+ },
+ {
+ label: "派出所",
+ value: "暂无数据"
+ },
+ {
+ label: "辖区民警",
+ value: "暂无数据"
+ },
+ {
+ label: "联系电话",
+ value: "暂无数据"
+ }
+ ],
+ scene: [{
+ label: "消防照片",
+ value: "",
+ useSlot: "pic",
+ },
+ {
+ label: "采集人",
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ value: "未完善"
+ },
+ {
+ label: "消防负责人",
+ value: "未完善",
+ },
+ {
+ label: "采集人",
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ value: "未完善",
+ },
+ {
+ label: "历史事件",
+ value: "未完善",
+ }
+ ],
+ },
+
+ activeIds: [],
+ showLabelList: [],
+
+ stdId: "",
+ }
+ },
+ watch: {
+ activeIds: {
+ handler(newVal) {
+ this.form.label = newVal.join(",")
+ }
+ },
+ "form.buildingCode": {
+ handler(newVal) {
+ console.log(newVal)
+ }
+ }
+
+ },
+
+ created() {
+ this.buildColumn()
+ },
+ mounted() {
+
+ },
+ options: {
+ styleIsolation: 'shared', // 解除样式隔离
+ },
+ onLoad(option) {
+ this.stdId = option.stdId
+ console.log(this.stdId, "----------")
+ if (this.stdId) {
+ this.getBuildingDetail()
+ }
+
+
+ },
+ onShow() {
+ this.getLabel()
+ this.getLocation()
+ },
+ methods: {
+
+ getBuildingDetail(params = {}) {
+ getDoorplateAddressDetail(Object.assign(params, {
+ stdId: this.stdId
+ })).then(res => {
+ let data = res.data
+ this.form.buildingCode = data.buildingCode
+
+ let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName,
+ data.buildingName
+ ]
+ let arr = buildingNameArr.filter(e => {
+ return e != null || e != ''
+ })
+ this.form.building = arr.join("")
+ })
+ },
+
+ //表单提交
+ submit() {
+ const that = this
+ this.$refs.form.validate().then(valid => {
+ if (valid) {
+ if (this.form.images.length > 0) {
+ let urls = []
+ this.form.images.forEach(e => {
+ urls.push(e.name)
+ })
+ this.form.imageUrls = urls.join(",")
+ }
+ add(this.form).then(res => {
+ uni.showToast({
+ icon: 'success',
+ title: '提交成功',
+ success() {
+ setTimeout(() => {
+ that.$u.func.globalNavigator(
+ "/pages/home/index", "switchTab")
+ }, 1000)
+ }
+ })
+ })
+ }
+ })
+
+ },
+
+ async buildColumn() {
+
+ //设置街道
+ const townStreet = await this.getDoorplateAddressList(null, "townStreet")
+ this.setColumn(townStreet, 0)
+ //设置社区
+ const nei = await this.getDoorplateAddressList(townStreet[0].code, "nei")
+ this.setColumn(nei, 1)
+ //设置路
+ const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu")
+ this.setColumn(streetRu, 2)
+ //设置地区
+ const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
+ this.setColumn(district, 3)
+ //设置楼栋
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
+ this.setColumn(building, 4)
+ },
+
+ setColumn(data, index) {
+ this.$set(this.pickColumns, index, data)
+ },
+
+ getLocation() {
+ const that = this
+ uni.getLocation({
+ type: 'wgs84', // 坐标系类型
+ success: function(res) {
+ var latitude = res.latitude; // 维度
+ var longitude = res.longitude; // 经度
+
+ that.form.lng = longitude
+ that.form.lat = latitude
+
+ that.form.jwd = longitude + "," + latitude
+ },
+ fail: function(res) {
+ console.log('获取定位失败:' + res.errMsg);
+ }
+ });
+ },
+
+ async getDoorplateAddressList(code, type) {
+ const res = await getDoorplateAddressList(code, type)
+ return res.data
+ },
+
+ confirmPicker(e) {
+
+ if (e.value[4]) {
+ this.selectValue = e.value
+
+ let arr = this.selectValue.map(e => e.name)
+ this.form.building = arr.join("")
+
+ this.form.buildingCode = e.value[4].code
+ }
+ this.showPicker = false
+ },
+
+ async changeHandler(e) {
+ const {
+ columnIndex,
+ index,
+ // 微信小程序无法将picker实例传出来,只能通过ref操作
+ picker = this.$refs.uPicker
+ } = e
+ let item = e.values[columnIndex][index]
+ //街道
+ if (columnIndex === 0) {
+ //获取社区列表
+ const nei = await this.getDoorplateAddressList(item.code, "nei")
+ picker.setColumnValues(1, nei)
+
+ const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu")
+ picker.setColumnValues(2, streetRu)
+
+ const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
+ picker.setColumnValues(3, district)
+
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
+ picker.setColumnValues(4, building)
+ }
+
+ if (columnIndex === 1) {
+ const streetRu = await this.getDoorplateAddressList(item.code, "streetRu")
+ picker.setColumnValues(2, streetRu)
+
+ const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
+ picker.setColumnValues(3, district)
+
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
+ picker.setColumnValues(4, building)
+ }
+
+ if (columnIndex === 2) {
+
+ const district = await this.getDoorplateAddressList(item.code, "district")
+ picker.setColumnValues(3, district)
+
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
+ picker.setColumnValues(4, building)
+ }
+
+ if (columnIndex === 3) {
+ const building = await this.getDoorplateAddressList(item.code, "building")
+ picker.setColumnValues(4, building)
+ }
+
+ },
+
+ //弹出层打开
+ popup() {
+ this.$refs.uniPopup.open()
+ },
+
+ getLabel() {
+ getLabelList({
+ size: -1
+ }).then(res => {
+ let data = res.data.records
+ data.sort((a, b) => a.sort - b.sort)
+
+ data.forEach(label => {
+ this.labelList[0].children.push({
+ id: label.id,
+ text: label.labelName
+ })
+ })
+ })
+ },
+
+ labelClick(item) {
+
+ //判断label是否已在
+ const label = this.showLabelList.find(e => e.id == item.id)
+ if (label) {
+ //在,去掉
+ this.showLabelList = this.showLabelList.filter(e => e.id != label.id)
+ this.activeIds = this.activeIds.filter(e => e != label.id)
+ } else {
+ //不在,添加
+ item.isClose = false
+ this.showLabelList.push(item)
+ this.activeIds.push(item.id)
+ }
+
+ this.showLabelList.sort((a, b) => a.sort - b.sort)
+
+ },
+ delTag(label) {
+ label.isClose = true
+ this.showLabelList = this.showLabelList.filter(e => e.id != label.id)
+ this.activeIds = this.activeIds.filter(e => e != label.id)
+
+ }
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+ .container {
+ position: relative;
+ width: 100%;
+ // height: 100%;
+ display: flex;
+ flex-direction: column;
+ background: #F9F9FA;
+
+ .box-title {
+ padding: 10px 0;
+
+ .title-more {
+ display: flex;
+ align-items: center;
+ height: 100%;
+
+ .item {
+ width: 50rpx;
+ height: 40rpx;
+ color: #ffffff;
+ padding: 6rpx;
+ font-size: 2rpx;
+ text-align: center;
+ line-height: 20px;
+ }
+
+ }
+ }
+
+ .item {
+
+ .form-item {
+ background-color: #ffffff;
+ padding: 2rpx 10px;
+ border-bottom: 0.1px solid #eff1f3;
+ }
+
+ .label {
+ padding: 10rpx 30rpx;
+ display: flex;
+ background-color: #ffffff;
+ flex-wrap: wrap;
+
+ .activeLabel {
+ // width: 80rpx;
+ margin-left: 10rpx;
+ margin-top: 10rpx
+ }
+ }
+
+
+
+ }
+
+ .pic {
+ background-color: #ffffff;
+ padding: 40rpx 30rpx;
+ }
+
+ .bottom {
+ padding: 20rpx;
+ background-color: #ffffff;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .btn {
+ width: calc(100% - 40rpx);
+ }
+ }
+ }
+
+ /deep/ .u-form-item {
+ background-color: #ffffff;
+ padding: 2rpx 10px;
+ border-bottom: 1px solid #eff1f3;
+ }
+
+ .red {
+ background-color: red;
+ border-radius: 10rpx 0rpx 0rpx 10rpx;
+ }
+
+ .orange {
+ background-color: orange;
+ }
+
+ .green {
+ background-color: green;
+ border-radius: 0rpx 10rpx 10rpx 0rpx;
+ }
+</style>
\ No newline at end of file
--
Gitblit v1.9.3