| | |
| | | <template>
|
| | | <view class="main_app">
|
| | | <view class="main_wrap">
|
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>责任部门</text> |
| | | </view> |
| | | <view class="value" @click="isShowCompany = true"> |
| | | <text class="mr6" |
| | | :style="{ color: param.companyName ? '#000000' : '#999999' }">{{ param.companyName ? param.companyName : "请选择" }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | <!-- -->
|
| | | <view class="line">
|
| | | <view class="label">
|
| | | <text>*</text>
|
| | | <text>责任部门</text>
|
| | | </view>
|
| | | <view class="value" @click="isShowCompany = true">
|
| | | <text class="mr6"
|
| | | :style="{ color: param.companyName ? '#000000' : '#999999' }">{{ param.companyName ? param.companyName : "请选择" }}</text>
|
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
|
| | | </view>
|
| | | </view>
|
| | | <view class="line">
|
| | | <view class="label">
|
| | |
| | | <view class="footer_btn" @click="onSubmit">提交</view>
|
| | | </view>
|
| | | </view>
|
| | | <!-- --> |
| | | <u-picker keyName="name" :show="isShowCompany" closeOnClickOverlay :columns="deptList" @confirm="seletedCompany" |
| | | <!-- -->
|
| | | <u-picker keyName="name" :show="isShowCompany" closeOnClickOverlay :columns="deptList" @confirm="seletedCompany"
|
| | | @close="isShowCompany = false" @cancel="isShowCompany = false"></u-picker>
|
| | | <!-- 区域 -->
|
| | | <u-picker keyName="name" :show="isShowArea" closeOnClickOverlay :columns="areaOptions" @confirm="seletedArea"
|
| | |
| | | import {
|
| | | uploadUrl,
|
| | | DangerCreate,
|
| | | DangerConfigType, |
| | | DangerConfigType,
|
| | | deptListPost
|
| | | } from '@/api'
|
| | | import dayjs from 'dayjs'
|
| | |
| | | param: {},
|
| | | submitFileList: [],
|
| | |
|
| | | isShowCompany: false, |
| | | isShowCompany: false,
|
| | | isShowArea: false,
|
| | | isShowType: false,
|
| | | isShowTime: false,
|
| | | showUpload: false,
|
| | |
|
| | | deptList: [], |
| | | deptList: [],
|
| | | areaOptions: [],
|
| | | areaType: [],
|
| | | }
|
| | |
| | | const {
|
| | | param,
|
| | | submitFileList
|
| | | } = this |
| | | if (!param.companyName) return uni.showToast({ |
| | | title: '请选择责任部门', |
| | | icon: 'none' |
| | | } = this
|
| | | if (!param.companyName) return uni.showToast({
|
| | | title: '请选择责任部门',
|
| | | icon: 'none'
|
| | | })
|
| | | if (!param.areaName) return uni.showToast({
|
| | | title: '请选择隐患区域',
|
| | |
| | | this.$jump('/pages/staff/snapshotResult')
|
| | | }
|
| | | })
|
| | | }, |
| | | seletedCompany(e) { |
| | | const item = e.value[0] |
| | | this.$set(this.param, 'companyId', item.id) |
| | | this.$set(this.param, 'companyName', item.name) |
| | | this.$set(this.param, 'areaId', '') |
| | | this.$set(this.param, 'areaName', '') |
| | | DangerConfigType({ |
| | | type: '0', |
| | | companyId: item.id |
| | | }).then(res => { |
| | | this.areaOptions = [res.data] |
| | | }) |
| | | this.isShowCompany = false |
| | | },
|
| | | seletedCompany(e) {
|
| | | const item = e.value[0]
|
| | | this.$set(this.param, 'companyId', item.id)
|
| | | this.$set(this.param, 'companyName', item.name)
|
| | | this.$set(this.param, 'areaId', '')
|
| | | this.$set(this.param, 'areaName', '')
|
| | | DangerConfigType({
|
| | | type: '0',
|
| | | companyId: item.id
|
| | | }).then(res => {
|
| | | this.areaOptions = [res.data]
|
| | | })
|
| | | this.isShowCompany = false
|
| | | },
|
| | | seletedArea(e) {
|
| | | const item = e.value[0]
|
| | |
| | | this.$set(this.param, 'submitTime', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'))
|
| | | this.isShowTime = false
|
| | | },
|
| | | initConfig() { |
| | | deptListPost({queryHiddenDanger: 1}).then(res => { |
| | | this.deptList = [res.data] |
| | | initConfig() {
|
| | | deptListPost({queryHiddenDanger: 1}).then(res => {
|
| | | this.deptList = [res.data]
|
| | | })
|
| | | DangerConfigType({
|
| | | type: '1'
|
| | |
| | | this.showUpload = false
|
| | | let token = uni.getStorageSync('token') || ''
|
| | | uni.chooseImage({
|
| | | count: 4,
|
| | | count: 9,
|
| | | success: (chooseImageRes) => {
|
| | | uni.showLoading({
|
| | | title: '上传中',
|
| | |
| | |
|
| | | .adduser_list_item_ipt1_upload {
|
| | | margin-top: 24rpx;
|
| | | width: 120rpx;
|
| | | height: 120rpx;
|
| | | margin-right: 24rpx;
|
| | | width: 156rpx;
|
| | | height: 156rpx;
|
| | | margin-right: 20rpx;
|
| | | border: 2rpx solid #e5e5e5;
|
| | | background: #f7f7f7;
|
| | | color: #666666;
|
| | |
| | | align-items: center;
|
| | | justify-content: center;
|
| | | position: relative;
|
| | |
|
| | | &:nth-of-type(4n){ |
| | | margin-right: 0; |
| | | }
|
| | | .close {
|
| | | position: absolute;
|
| | | right: -20rpx;
|
| | |
| | |
|
| | | video {
|
| | | width: 100%;
|
| | | max-height: 120rpx;
|
| | | max-height: 156rpx;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | .footer {
|
| | | width: 100%;
|
| | | padding: 0 30rpx; |
| | | padding: 0 30rpx;
|
| | | margin-top: 80rpx;
|
| | | padding-bottom: env(safe-area-inset-bottom);
|
| | | box-sizing: border-box;
|