9 files modified
1 files added
| | |
| | | // devUrl: 'https://sk.hubeishuiyi.cn', |
| | | // devUrl: 'http://192.168.1.156:9528', |
| | | // devUrl:'http://192.168.1.50:9528', |
| | | devUrl: 'http://192.168.1.133:9528', |
| | | devUrl: 'http://192.168.0.104:9528', |
| | | minioBaseUrl: "http://60.220.177.113:9000/jczz/", |
| | | // 数据中台接口url |
| | | // dataCenterUrl: 'http://10.10.2.192/services', |
| | |
| | | clientSecret |
| | | } from '@/common/setting' |
| | | |
| | | import { |
| | | Base64 |
| | | } from '@/utils/base64.js'; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | this.loadingClose() |
| | | }, |
| | | |
| | | |
| | | //删除图片 |
| | | deletePic(event) { |
| | |
| | | "navigationBarTitleText": "标签事件", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#4586fe", |
| | | "navigationBarTextStyle": "white" |
| | | "navigationBarTextStyle": "white", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | |
| | | "style": { |
| | | "navigationBarTitleText": "旅馆安全自查", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#4586fe", |
| | | "navigationBarTextStyle": "white" |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black" |
| | | } |
| | | },{ |
| | | "path": "released", |
| | |
| | | </u-navbar>
|
| | | <view class="content">
|
| | | <view class="swiper mb-30">
|
| | | <u-swiper :list="swiperList" height="320rpx"></u-swiper>
|
| | | <u-swiper :list="swiperList" height="320rpx"></u-swiper>
|
| | | </view>
|
| | | <view class="" v-if="roleType != 1">
|
| | | <u-grid :border="false" :col="roleType == 2?3:4">
|
| | |
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="block-item" @click="navigatorPage('/subPackage/user/clockIn/index')">
|
| | | <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="90rpx" height="90rpx"></u-icon>
|
| | |
| | |
|
| | | <view class="row flex j-c-s-b">
|
| | | <view class="row-item flex_base">
|
| | | <u-icon name="/static/icon/nav-07.png" width="90rpx" height="90rpx"></u-icon>
|
| | | <u-icon name="/static/icon/nav-07.png" width="90rpx" height="90rpx"></u-icon>
|
| | | <view class="flex f-d-c fw ml-20">
|
| | | <text class="f-28">一次性</text>
|
| | | <text class="f-36 c-main">8</text>
|
| | | </view>
|
| | | </view>
|
| | | <view class="row-item flex_base">
|
| | | <u-icon name="/static/icon/nav-08.png" width="90rpx" height="90rpx"></u-icon>
|
| | | <u-icon name="/static/icon/nav-08.png" width="90rpx" height="90rpx"></u-icon>
|
| | | <view class="flex f-d-c fw ml-20">
|
| | | <text class="f-28">周期性</text>
|
| | | <text class="f-36" style="color:#FD7F19">8</text>
|
| | | <text class="f-36" style="color:#FD7F19">8</text>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
| | | </view>
|
| | |
|
| | | <view class="notic" v-if="roleType == 3">
|
| | | <view class="caption flex a-i-c j-c-s-b" @click="navigatorPage('/subPackage/notice/list')">
|
| | | <view class="caption flex a-i-c j-c-s-b" @click="navigatorPage('/subPackage/notice/list')">
|
| | | <view class="flex a-i-c">
|
| | | <view class="line"></view>
|
| | | <text class="f-32">通知公告</text>
|
| | | </view>
|
| | | <u-icon name="arrow-right"></u-icon>
|
| | | </view>
|
| | | <view class="notic-list" @click="navigatorPage('/subPackage/notice/detail')">
|
| | | <view class="notic-list" @click="navigatorPage('/subPackage/notice/detail')">
|
| | | <view class="f-28 mb-30">
|
| | | 新业态新就业群体现状调查问卷
|
| | | </view>
|
| | |
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | <u-picker :title="roleTypeName" :closeOnClickOverlay="true" @close="selectBoxShow = false" :show="selectBoxShow" keyName="name" ref="uPicker" :columns="siteColumns"
|
| | | @confirm="confirmSite" @change="changeSite" @cancel="selectBoxShow = false"></u-picker>
|
| | | <u-picker :title="roleTypeName" :closeOnClickOverlay="true" @close="selectBoxShow = false"
|
| | | :show="selectBoxShow" keyName="name" ref="uPicker" :columns="siteColumns" @confirm="confirmSite"
|
| | | @change="changeSite" @cancel="selectBoxShow = false"></u-picker>
|
| | | </view>
|
| | |
|
| | | </view>
|
| | |
| | | style: {
|
| | | background: 'linear-gradient(133deg, #FFFCF9 0%, rgba(255,252,249,0) 100%)',
|
| | | },
|
| | | path:"/subPackage/workbench/views/csjl"
|
| | | path: "/subPackage/workbench/views/csjl"
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-02.png",
|
| | |
| | | style: {
|
| | | background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
|
| | | },
|
| | | path:"/subPackage/workbench/views/cscj"
|
| | | path: "/subPackage/workbench/views/cscj"
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-03.png",
|
| | |
| | | style: {
|
| | | background: 'linear-gradient(131deg, #FCF8FF 0%, rgba(252,248,255,0) 100%)',
|
| | | },
|
| | | path:"/subPackage/workbench/views/rental"
|
| | | path: "/subPackage/workbench/views/rental"
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-04.png",
|
| | |
| | | style: {
|
| | | background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
|
| | | },
|
| | | path:"/subPackage/workbench/views/audit"
|
| | | path: "/subPackage/workbench/views/audit"
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-05.png",
|
| | |
| | | style: {
|
| | | background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
|
| | | },
|
| | | path:"/subPackage/workbench/views/cscj"
|
| | | path: "/subPackage/workbench/views/cscj"
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-06.png",
|
| | |
| | | style: {
|
| | | background: 'linear-gradient(137deg, #FFF4F3 0%, rgba(255,244,243,0) 100%)',
|
| | | },
|
| | | path:""
|
| | | path: ""
|
| | | },
|
| | | // {
|
| | | // icon: "/static/icon/menu-07.png",
|
| | |
| | | status: "待处理0"
|
| | | }
|
| | | ],
|
| | | roleType: 1, // 1网格员/系统管理员 、2场所负责人、 3居民
|
| | | roleType: 3, // 1网格员/系统管理员 、2场所负责人、 3居民
|
| | | roleTypeName: "街道社区网格",
|
| | | selectBoxShow: false,
|
| | | siteColumns: [],
|
| | |
| | | } else {
|
| | | return []
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | },
|
| | |
|
| | | watch: {
|
| | | 'curSelectSite.id': {
|
| | | handler(newVal, oldVal) {
|
| | | console.log(newVal)
|
| | | if (newVal) {
|
| | | this.$store.commit("setSiteInfo", this.curSelectSite)
|
| | | }
|
| | | },
|
| | | deep: true,
|
| | | immediate: true
|
| | | }
|
| | | },
|
| | |
|
| | | methods: {
|
| | |
|
| | | //初始化
|
| | |
| | | },
|
| | |
|
| | | navigatorPage(path) {
|
| | | if(path){
|
| | | if (path) {
|
| | | this.$u.func.globalNavigator(path, "navTo")
|
| | | }
|
| | | },
|
| | |
| | | </script>
|
| | |
|
| | | <style lang="scss" scoped>
|
| | | page{
|
| | | color:#333;
|
| | | page {
|
| | | color: #333;
|
| | | }
|
| | |
|
| | | .top {
|
| | | width: 530rpx;
|
| | |
|
| | |
| | | .caption {
|
| | | width: 100%;
|
| | | padding: 30rpx 0 0;
|
| | |
|
| | | .line {
|
| | | width: 6rpx;
|
| | | height: 28rpx;
|
| | |
| | | adCodeBase: {}, |
| | | // tabbarIndex: uni.getStorageSync("tabbarIndex") || 0, |
| | | hasUpdate: false, //true为不可登录,需要更新,false则是最新版 |
| | | |
| | | menu: [], |
| | | siteInfo:{} //社区信息 |
| | | }, |
| | | |
| | | mutations: { |
| | |
| | | SET_USER_INFO(state, data) { |
| | | state.userInfo = data |
| | | uni.setStorageSync('userInfo', data) |
| | | }, |
| | | //设置社区位置 |
| | | setSiteInfo(state,val){ |
| | | state.siteInfo = val; |
| | | uni.setStorageSync('siteInfo', val) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | |
| | |
| | | <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> --> |
| | | <view class=""> |
| | | |
| | | <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 labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="100" |
| | | :labelStyle="{fontSize:'28rpx'}"> |
| | | <view class="content"> |
| | | <u-form-item label="社区名称" prop="districtName" borderBottom required> |
| | | <u-input v-model="info.districtName" disabled disabledColor="#fff" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></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 label="酒店名称" prop="hotelName" borderBottom required> |
| | | <u-input v-model="info.hotelName" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></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-form-item label="自查时间" prop="checkTime" borderBottom required @click="showSelectDate = true"> |
| | | <u-input v-model="info.checkTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></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 label="自查人姓名" prop="phone" borderBottom required> |
| | | <u-input v-model="info.checkUserName" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="自查人手机" prop="phone" borderBottom required> |
| | | <u-input v-model="info.checkTelephone" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="自查位置" prop="phone" borderBottom ref="location" required> |
| | | <u-input v-model="info.location" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="灭火器数量" prop="fireNums" borderBottom > |
| | | <u-input type="number" v-model="info.fireNums" border="none" placeholder="请输入" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="灭火器状态" prop="fireStatus" :borderBottom="false" ref="fireStatus" required |
| | | @click="isShowFireStatus = true"> |
| | | <u-input v-model="info.fireStatus" disabled disabledColor="#fff" border="none" placeholder="请选择" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | </view> |
| | | |
| | | <view class="upload bgc-ff"> |
| | | <view class="f-28 mb-20">灭火器图片(需拍到限用日期)</view> |
| | | <view class="mt-20"> |
| | | <u-upload :fileList="fireImageUrls" :previewFullImage="uploadConfig.previewFullImage" |
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" |
| | | :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImgs($event,'fireImageUrls')" |
| | | @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="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> |
| | | <view class="content"> |
| | | <u-form-item label="安全通道有无" prop="scFlag" borderBottom required> |
| | | <u-radio-group v-model="info.scFlag"> |
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" :key="index" |
| | | :label="item" :name="item"> |
| | | </u-radio> |
| | | </u-radio-group> |
| | | </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-form-item label="安全通道状态" prop="scStatus" :borderBottom="false" ref="scFlag" required |
| | | @click="isShowScStatus = true"> |
| | | <u-input v-model="info.scStatus" disabled disabledColor="#fff" border="none" placeholder="请选择" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></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 class="upload bgc-ff"> |
| | | <view class="f-28 mb-20">安全通道图片(需拍到门和指示箭头)</view> |
| | | <view class="mt-20"> |
| | | <u-upload :fileList="scImageUrls" :previewFullImage="uploadConfig.previewFullImage" |
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" |
| | | :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImgs(event,'scImageUrls')" |
| | | @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="box-title"> |
| | | <box-title title="技防设施(拍到视频画面)"></box-title> |
| | | <view class="content"> |
| | | <u-form-item label="技防设施有无" prop="pfFlag" borderBottom required> |
| | | <u-radio-group v-model="info.pfFlag"> |
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" :key="index" |
| | | :label="item" :name="item"> |
| | | </u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="技防设施名称" prop="pfName" :borderBottom="false" required> |
| | | <u-input v-model="info.pfName" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | </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 class="upload bgc-ff mb-20"> |
| | | <view class="f-28 mb-20">技防设施照片(需拍到视频画面)</view> |
| | | <view class="mt-20"> |
| | | <u-upload :fileList="pfImageUrls" :previewFullImage="uploadConfig.previewFullImage" |
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" |
| | | :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImgs($event,'pfImageUrls')" |
| | | @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="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> |
| | | |
| | | <view class="upload bgc-ff"> |
| | | <view class="f-28 mb-20">未成年人入住登记本照片上传</view> |
| | | <view class="mt-20"> |
| | | <u-upload :fileList="uanImageUrls" :previewFullImage="uploadConfig.previewFullImage" |
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" |
| | | :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImgs($event,'uanImageUrls')" |
| | | @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="content"> |
| | | <u-form-item label="是否实名登记" prop="realName" borderBottom required> |
| | | <u-radio-group v-model="info.realName"> |
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" :key="index" |
| | | :label="item" :name="item"> |
| | | </u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | </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> |
| | | |
| | | |
| | | <button class="submit-btn" @click="sumitInfo">提交</button> |
| | | <button class="list-btn" @click="navigatorPage">我上报的事件</button> |
| | | <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="checkTime" mode="datetime" |
| | | :formatter="formatter" @confirm="confirmDate" @cancel="showSelectDate = false"></u-datetime-picker> |
| | | <u-picker :show="isShowFireStatus" :columns="fireStatus" :defaultIndex="fireStatusIndex" |
| | | @cancel="isShowFireStatus = false" @confirm="confirmFireStatus"></u-picker> |
| | | <u-picker :show="isShowScStatus" :columns="scStatus" :defaultIndex="scStatusIndex" |
| | | @cancel="isShowScStatus = false" @confirm="confirmScStatus"></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"; |
| | | save |
| | | } from "@/api/task/taskReportForRepairs"; |
| | | 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: "", |
| | | info: { |
| | | districtName: "", |
| | | hotelName: "", |
| | | checkUserName: "", |
| | | checkTelephone: "", |
| | | checkTime:'' , |
| | | fireNums: "", |
| | | fireStatus: "", |
| | | scFlag: "", |
| | | scStatus: "", |
| | | pfFlag: "", |
| | | pfName: "", |
| | | realName: "", |
| | | districtId:"", |
| | | checkUserId:"", |
| | | }, |
| | | rules: { |
| | | 'buildingCode': { |
| | | 'districtName': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请选择楼栋', |
| | | message: '请输入社区名称', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'placeName': { |
| | | 'hotelName': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入场所名称', |
| | | message: '请输入酒店名称', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'label': { |
| | | 'checkTime': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请选择标签', |
| | | trigger: ['blur', 'change'], |
| | | message: '请选择自查时间', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'username': { |
| | | 'checkName': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入场所负责人', |
| | | trigger: ['blur', 'change'], |
| | | message: '请输入自查人姓名', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'phone': { |
| | | 'checkPhone': { |
| | | type: 'number', |
| | | required: true, |
| | | message: '请输入自查人手机', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'location':{ |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入手机号', |
| | | trigger: ['blur', 'change'], |
| | | message: '请输入自查位置', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'fireNums':{ |
| | | type: 'string', |
| | | required: false, |
| | | message: '请输入自查数量', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'fireStatus':{ |
| | | type: 'string', |
| | | required: false, |
| | | message: '请选择灭火器状态', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'scFlag':{ |
| | | type: 'string', |
| | | required: true, |
| | | message: '请选择安全通道有无', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'scStatus':{ |
| | | type: 'string', |
| | | required: true, |
| | | message: '请选择安全通道状态', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'pfFlag':{ |
| | | type: 'string', |
| | | required: true, |
| | | message: '请选择技防设施有无', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'pfName':{ |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入技防设施名称', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'realName':{ |
| | | 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: "", |
| | | showSelectDate: false, |
| | | fireImageUrls: [], //灭火器图片 |
| | | scImageUrls: [], // 安全通道图片 |
| | | uanImageUrls: [], //未成年人入住登记本照片 |
| | | pfImageUrls: [], //技防设施照片 |
| | | statusList: ["有", "无"], |
| | | fireStatus: [["正常", "已使用", "失效", "已过期"]], //灭火器状态 |
| | | scStatus: [["开启", "关闭"]], //安全通道状态 |
| | | fireStatusIndex: [0], |
| | | scStatusIndex: [0], |
| | | isShowFireStatus: false, |
| | | isShowScStatus: false, |
| | | checkTime:Number(new Date()) |
| | | } |
| | | }, |
| | | 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() |
| | | } |
| | | |
| | | |
| | | let siteInfo = uni.getStorageSync("siteInfo"); |
| | | let userInfo = uni.getStorageSync("userInfo"); |
| | | this.$set(this.info,"districtId",siteInfo.id); |
| | | this.$set(this.info,"districtName",siteInfo.name); |
| | | this.$set(this.info,"checkUserId",userInfo.user_id); |
| | | }, |
| | | onShow() { |
| | | this.getLabel() |
| | | this.getLocation() |
| | | |
| | | onReady() { |
| | | // 微信小程序需要用此写法 |
| | | this.$refs.datetimePicker.setFormatter(this.formatter) |
| | | console.log("==>",this) |
| | | }, |
| | | |
| | | 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("") |
| | | }) |
| | | formatter(type, value) { |
| | | if (type === 'year') { |
| | | return `${value}年` |
| | | } |
| | | if (type === 'month') { |
| | | return `${value}月` |
| | | } |
| | | if (type === 'day') { |
| | | return `${value}日` |
| | | } |
| | | return value |
| | | }, |
| | | |
| | | //表单提交 |
| | | submit() { |
| | | const that = this |
| | | confirmDate(e) { |
| | | console.log(e); |
| | | this.showSelectDate = false; |
| | | this.info.checkTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM') |
| | | }, |
| | | |
| | | confirmFireStatus(e){ |
| | | console.log(e); |
| | | this.fireStatusIndex = e.indexs; |
| | | this.info.fireStatus = e.value[0]; |
| | | this.isShowFireStatus = false; |
| | | }, |
| | | confirmScStatus(e){ |
| | | console.log(e); |
| | | this.scStatusIndex = e.indexs; |
| | | this.info.scStatus = e.value[0]; |
| | | this.isShowScStatus = false; |
| | | }, |
| | | |
| | | async afterReadImgs(event,key) { |
| | | this.showLoading() |
| | | // var that = this; |
| | | // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 |
| | | let lists = [].concat(event.file) |
| | | let fileListLen = this[key].length |
| | | lists.map((item) => { |
| | | this[key].push({ |
| | | ...item, |
| | | status: 'uploading', |
| | | message: '上传中' |
| | | }) |
| | | }) |
| | | for (let i = 0; i < lists.length; i++) { |
| | | const result = await this.uploadFilePromise(lists[i].url) |
| | | console.log(result); |
| | | this[key].splice(fileListLen, 1, Object.assign({}, { |
| | | url: result.data.link, |
| | | name:result.data.name |
| | | })) |
| | | fileListLen++ |
| | | } |
| | | this.loadingClose() |
| | | }, |
| | | |
| | | checkImages() { |
| | | if (this.fireImageUrls.length) { |
| | | this.info.fireImageUrls = this.fireImageUrls.join(",") |
| | | } |
| | | if (this.scImageUrls.length) { |
| | | this.info.scImageUrls = this.scImageUrls.join(",") |
| | | } |
| | | if (this.pfImageUrls.length) { |
| | | this.info.pfImageUrls = this.pfImageUrls.join(",") |
| | | } |
| | | if (this.uanImageUrls.length) { |
| | | this.info.uanImageUrls = this.uanImageUrls.join(",") |
| | | } |
| | | }, |
| | | |
| | | sumitInfo() { |
| | | 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 |
| | | this.checkImages() |
| | | save(this.info).then(res => { |
| | | uni.showToast({ |
| | | icon: 'success', |
| | | title: '提交成功', |
| | | success() { |
| | | // setTimeout(() => { |
| | | // that.$u.func.globalNavigator("", "navBack") |
| | | // }, 1000) |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | 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) |
| | | |
| | | navigatorPage() { |
| | | let url = "/subPackage/bs/views/repairList" + "?title=" + this.title + "&type=" + this.info.type |
| | | this.$u.func.globalNavigator(url, "navTo") |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .container { |
| | | position: relative; |
| | | width: 100%; |
| | | // height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | background: #F9F9FA; |
| | | <style lang="less"> |
| | | page { |
| | | background-color: #F5F5F5; |
| | | } |
| | | |
| | | .box-title { |
| | | padding: 10px 0; |
| | | .content { |
| | | margin: 20rpx 30rpx; |
| | | padding: 0 30rpx; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .title-more { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100%; |
| | | /deep/.u-radio-group--row { |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .item { |
| | | width: 50rpx; |
| | | height: 40rpx; |
| | | color: #ffffff; |
| | | padding: 6rpx; |
| | | font-size: 2rpx; |
| | | text-align: center; |
| | | line-height: 20px; |
| | | } |
| | | .site-box { |
| | | padding: 30rpx; |
| | | margin: 20rpx 30rpx; |
| | | border-radius: 4rpx; |
| | | |
| | | } |
| | | .c-aa { |
| | | color: #aaa; |
| | | } |
| | | |
| | | .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); |
| | | } |
| | | .address { |
| | | width: 60%; |
| | | margin-left: 25rpx; |
| | | } |
| | | } |
| | | |
| | | /deep/ .u-form-item { |
| | | background-color: #ffffff; |
| | | padding: 2rpx 10px; |
| | | border-bottom: 1px solid #eff1f3; |
| | | .upload-item { |
| | | width: 140rpx; |
| | | height: 140rpx; |
| | | border: 1px solid #EEEEEE; |
| | | } |
| | | |
| | | .red { |
| | | background-color: red; |
| | | border-radius: 10rpx 0rpx 0rpx 10rpx; |
| | | .upload { |
| | | margin: 0 30rpx; |
| | | padding: 30rpx; |
| | | |
| | | |
| | | } |
| | | |
| | | .orange { |
| | | background-color: orange; |
| | | .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; |
| | | } |
| | | |
| | | .green { |
| | | background-color: green; |
| | | border-radius: 0rpx 10rpx 10rpx 0rpx; |
| | | .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; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <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 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> |
| | | <u-picker :show="show" :columns="columns"></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 lang="scss"> |
| | | |
| | | page{ |
| | | background-color: #F5F5F5;; |
| | | } |
| | | |
| | | .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 { |
| | | padding:0 30rpx; |
| | | .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> |
| | |
| | | width:100%; |
| | | height:88rpx; |
| | | position:fixed; |
| | | /*#ifdef H5*/ |
| | | top:88rpx; |
| | | /*#endif*/ |
| | | /*#ifdef MP-WEIXIN*/ |
| | | top:0; |
| | | /*#endif*/ |
| | | left:0; |
| | | background-color:#fff; |
| | | padding:0 30rpx; |
| | |
| | | })
|
| | | }
|
| | | },
|
| | | onLoad() {
|
| | | this.getStatistics()
|
| | | this.getList()
|
| | | },
|
| | | onShow() {
|
| | | this.getRentalHouseInfo()
|
| | | },
|
| | | // onLoad() {
|
| | | // this.getStatistics()
|
| | | // this.getList()
|
| | | // },
|
| | | // onShow() {
|
| | | // this.getRentalHouseInfo()
|
| | | // },
|
| | | methods: {
|
| | | handleSelect(res) {
|
| | | console.log('选择res = ' + JSON.stringify(res));
|
| | |
| | | .header { |
| | | width: 100%; |
| | | position: fixed; |
| | | top: 0; |
| | | /*#ifdef H5*/
|
| | | top:88rpx;
|
| | | /*#endif*/
|
| | | /*#ifdef MP-WEIXIN*/
|
| | | top:0;
|
| | | /*#endif*/ |
| | | left: 0; |
| | | z-index: 10; |
| | | } |
| | | |
| | | .filter-box { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | height: 100rpx;
|
| | | |
| | | } |
| | | |
| | | .search-box { |
| | |
| | | <template> |
| | | <view class="filter-wrapper" :style="{ height: height + 'rpx', top: top,'border-top':border?'1rpx solid #f2f2f2':'none' }" @touchmove.stop.prevent="discard"> |
| | | <view class="filter-wrapper" :style="{ height: height + 'rpx','border-top':border?'1rpx solid #f2f2f2':'none' }" @touchmove.stop.prevent="discard"> |
| | | <view class="inner-wrapper"> |
| | | <view class="mask" :class="showMask ? 'show' : 'hide'" @tap="tapMask"></view> |
| | | <view class="navs"> |
| | | <view class="c-flex-align" :class="{ 'c-flex-center': index > 0,'right c-flex-aligin': index == (navData.length-1), actNav: index === actNav }" v-for="(item, index) in navData" :key="index" @click="navClick(index)"> |
| | | <!-- v-if改v-show --> |
| | | <view v-for="(child, childx) in item" :key="childx" v-show="child.select">{{ child.name }}</view> |
| | | <image src="https://i.loli.net/2020/07/15/QsHxlr1gbSImvWt.png" mode="" class="icon-triangle" v-if="index === actNav"></image> |
| | | <image src="https://i.loli.net/2020/07/15/xjVSvzWcH9NO7al.png" mode="" class="icon-triangle" v-else></image> |
| | | <view v-for="(child, childx) in item" :key="childx" v-show="child.select" style="margin-right:16rpx;">{{ child.name }}</view> |
| | | <!-- <image src="https://i.loli.net/2020/07/15/QsHxlr1gbSImvWt.png" mode="" class="icon-triangle" v-if="index === actNav"></image> |
| | | <image src="https://i.loli.net/2020/07/15/xjVSvzWcH9NO7al.png" mode="" class="icon-triangle" v-else></image>--> |
| | | <u-icon name="arrow-up-fill" color="#017BFC" v-if="index === actNav" size="14" ></u-icon> |
| | | <u-icon name="arrow-down-fill" color="#666666" size="14" v-else></u-icon> |
| | | </view> |
| | | |
| | | |
| | |
| | | flex-direction: column; |
| | | } |
| | | .filter-wrapper { |
| | | position: fixed; |
| | | left: 0; |
| | | // position: fixed; |
| | | // left: 0; |
| | | width: 100%; |
| | | z-index: 999; |
| | | // z-index: 999; |
| | | .inner-wrapper { |
| | | // position: relative; |
| | | .navs { |
| | |
| | | justify-content: space-between; |
| | | background-color: #fff; |
| | | // border-bottom: 2rpx solid #f5f6f9; |
| | | color: #8b9aae; |
| | | // color: #8b9aae; |
| | | color:#666; |
| | | z-index: 999; |
| | | box-sizing: border-box; |
| | | font-size:28rpx; |
| | | & > view { |
| | | flex: 1; |
| | | height: 100%; |
| | |
| | | // justify-content: flex-end; |
| | | } |
| | | .actNav { |
| | | color: #4d7df9; |
| | | // color: #4d7df9; |
| | | color:#017BFC; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | .mask { |
| | | z-index: 666; |
| | | position: fixed; |
| | | top: calc(var(--status-bar-height) + 44px); |
| | | // top: calc(var(--status-bar-height) + 44px); |
| | | top:0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background-color: rgba(0, 0, 0, 0); |
| | | transition: background-color 0.15s linear; |
| | | z-index: 100; |
| | | &.show { |
| | | background-color: rgba(0, 0, 0, 0.01); |
| | | background-color: rgba(0, 0, 0, 0.3); |
| | | } |
| | | &.hide { |
| | | display: none; |
| | |
| | | display: none; |
| | | .item-opt { |
| | | height: 80rpx; |
| | | padding: 0 40rpx; |
| | | color: #8b9aae; |
| | | border-bottom: 2rpx solid #f5f6f9; |
| | | padding: 0 30rpx; |
| | | // color: #8b9aae; |
| | | color:#666; |
| | | border-bottom: 2rpx solid #F5F5F5; |
| | | } |
| | | .actOpt { |
| | | color: #4d7df9; |