| | |
| | | <ul class="toolbar" v-permissions="['business:ywpatrolscheme:create', 'business:ywpatrolscheme:delete']"> |
| | | <li><el-button type="primary" @click="editClick()" icon="el-icon-plus" |
| | | v-permissions="['business:ywpatrolscheme:create']">新建</el-button></li> |
| | | <el-button type="primary" plain :loading="isWorking.export" v-permissions="['business:ywpatrolscheme:exportExcel']" |
| | | @click="exportExcel">导出</el-button> |
| | | <el-button type="primary" plain :loading="isWorking.export" |
| | | v-permissions="['business:ywpatrolscheme:exportExcel']" @click="exportExcel">导出</el-button> |
| | | <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" |
| | | v-permissions="['business:ywpatrolscheme:delete']">删除</el-button></li> --> |
| | | </ul> |
| | |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | |
| | | <el-table-column prop="title" label="计划名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="lineId" label="计划编号" min-width="100px"></el-table-column> |
| | | <el-table-column prop="code" label="计划编号" min-width="100px"></el-table-column> |
| | | <el-table-column prop="userName" label="负责人员" min-width="100px"></el-table-column> |
| | | |
| | | <el-table-column prop="startDate" label="计划日期" min-width="150px"> |
| | |
| | | <template> |
| | | <GlobalWindow width="800px" :title="title" :visible.sync="visible" @close="close" :confirm-working="isWorking" @confirm="confirm"> |
| | | <GlobalWindow width="800px" :title="title" :visible.sync="visible" @close="close" :confirm-working="isWorking" |
| | | @confirm="confirm"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="位置类型" prop="areaType"> |
| | | <el-select v-model="form.areaType"> |
| | |
| | | // 表单数据 |
| | | form: { |
| | | id: null, |
| | | creator: '', |
| | | createDate: '', |
| | | editor: '', |
| | | editDate: '', |
| | | floor: '', |
| | | isdeleted: '', |
| | | title: '', |
| | | remark: '', |
| | | status: '', |
| | |
| | | floorId: '', |
| | | roomId: '', |
| | | userId: '', |
| | | phone: '', |
| | | submitDate: '', |
| | | cateId: '', |
| | | areaType: '0', |
| | |
| | | // 新建 |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form = { |
| | | id: null, |
| | | editDate: '', |
| | | floor: '', |
| | | title: '', |
| | | remark: '', |
| | | status: '', |
| | | sortnum: '', |
| | | content: '', |
| | | getDate: '', |
| | | projectId: '', |
| | | buildingId: '', |
| | | floorId: '', |
| | | roomId: '', |
| | | userId: '', |
| | | submitDate: '', |
| | | cateId: '', |
| | | areaType: '0', |
| | | code: '', |
| | | dealStatus: '', |
| | | dispatchUserId: '', |
| | | dispatchDate: '', |
| | | dispatchInfo: '', |
| | | dealUserId: '', |
| | | dealDate: '', |
| | | dealInfo: '', |
| | | dealType: '' |
| | | } |
| | | this.buildList = [] |
| | | this.roomList = [] |
| | | this.levelList = [] |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | |
| | | <template> |
| | | <GlobalWindow width="920px" title="工单详情" :visible.sync="visible" :confirm-working="isWorking" @close="close" |
| | | <GlobalWindow width="960px" title="工单详情" :visible.sync="visible" :confirm-working="isWorking" @close="close" |
| | | @confirm="confirm"> |
| | | <div class="main"> |
| | | <div class="title"> |
| | | <span>工单详情</span> |
| | | <div> |
| | | <div class="status primaryColor" v-if="info.dealStatus == 0 || info.dealStatus == null">待指派</div> |
| | | <div class="status" v-if="info.dealStatus == 1">已指派</div> |
| | | <div class="status green" v-if="info.dealStatus == 1">已指派</div> |
| | | <div class="status gray" v-if="info.dealStatus == 2">已处理</div> |
| | | </div> |
| | | </div> |
| | |
| | | import { detailById, dispatchOrder, dealOrder } from '@/api/workorder/ywWorkorder' |
| | | import { getUserList } from '@/api/system/user' |
| | | import { Message, Loading } from 'element-ui' |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | components: { |
| | | GlobalWindow |
| | |
| | | const { id } = this |
| | | detailById(id).then(res => { |
| | | this.info = res |
| | | if(this.info.dealStatus == 1){ |
| | | this.$set(this.param, 'getDate',dayjs().format('YYYY-MM-DD HH:mm:ss') ) |
| | | } |
| | | }) |
| | | }, |
| | | getStaff() { |
| | |
| | | align-items: center; |
| | | |
| | | .status { |
| | | padding: 0 6px; |
| | | height: 22px; |
| | | line-height: 22px; |
| | | padding: 0 12px; |
| | | height: 24px; |
| | | line-height: 24px; |
| | | border-radius: 2px; |
| | | border: 1px solid #00BA92; |
| | | color: #00BA92; |
| | |
| | | } |
| | | |
| | | .primaryColor { |
| | | border: 1px solid $primary-color; |
| | | border: 1px solid rgba(63, 126, 239,.2); |
| | | background-color: rgba(63, 126, 239,.2); |
| | | } |
| | | |
| | | .green{ |
| | | background-color: rgba(83, 183, 148, .2); |
| | | border: 1px solid rgba(83, 183, 148, .2); |
| | | } |
| | | .gray { |
| | | color: gray; |
| | | border: 1px solid gray; |
| | | color: #333333; |
| | | background-color: rgba(128, 128, 128, .2); |
| | | border: 1px solid rgba(128, 128, 128, .2); |
| | | } |
| | | } |
| | | |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | .la{ |
| | | margin-bottom: 0; |
| | | width: 72px; |
| | | } |
| | | } |
| | | |
| | | .max { |
| | |
| | | <ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']"> |
| | | <li><el-button type="primary" @click="handleEdit()" icon="el-icon-plus" |
| | | v-permissions="['business:category:create']">新建</el-button></li> |
| | | <li v-permissions="['business:category:exportExcel']"><el-button type="primary" |
| | | @click="exportExcel">导出</el-button></li> |
| | | <!-- <li v-permissions="['business:category:exportExcel']"><el-button type="primary" |
| | | @click="exportExcel">导出</el-button></li> --> |
| | | </ul> |
| | | <el-table row-key="id" :tree-props="{ children: 'childCategoryList' }" v-loading="isWorking.search" |
| | | :data="dataList" stripe @selection-change="handleSelectionChange"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item prop="cateId" label="工单分类"> |
| | | <el-cascader v-model="searchForm.areaIds" @change="changeSel" placeholder="请选择巡检区域" clearable |
| | | <el-cascader v-model="searchForm.areaIds" @change="changeSel" placeholder="请选择工单分类" clearable |
| | | :options="cateList" :props="{ |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childCategoryList' |
| | | }"></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="提交日期"> |
| | | <el-form-item label="上报时间"> |
| | | <el-date-picker v-model="searchForm.selDate" @change="changeSelDate" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" type="daterange"></el-date-picker> |
| | | </el-form-item> |
| | |
| | | buildingId: '', |
| | | cateId: '', |
| | | } |
| | | this.buildList = [] |
| | | this.search() |
| | | }, |
| | | changeSelDate(e) { |
| | |
| | | <view class="la"><text class="red">*</text>选择设备</view>
|
| | | <view class="line">
|
| | | <view class="sel_wrap" @click="showModal = true">
|
| | | <view class="left" :class="param.deviceName ? '' : 'placeholder9'">{{ param.deviceName ? param.deviceName : '请选择设备' }}</view>
|
| | | <view class="left" :class="param.deviceName ? '' : 'placeholder9'">
|
| | | {{ param.deviceName ? param.deviceName : '请选择设备' }}
|
| | | </view>
|
| | | <u-icon name="arrow-right" color="#999999" size="17"></u-icon>
|
| | | </view>
|
| | | <image class="icon" src="@/static/side/scan.png" mode=""></image>
|
| | | <image @click="openQrcode" class="icon" src="@/static/side/scan.png" mode=""></image>
|
| | | </view>
|
| | | </view>
|
| | | <view class="item"> |
| | |
| | | </view> |
| | | </u-popup> |
| | | <!-- --> |
| | | <u-popup :show="showModal" @close="showModal = false" :safeAreaInsetBottom="true" :round="10" closeable closeOnClickOverlay> |
| | | <u-popup :show="showModal" @close="showModal = false" :safeAreaInsetBottom="true" :round="10" closeable
|
| | | closeOnClickOverlay>
|
| | | <view class="appr_modal"> |
| | | <view class="title">请选择设备</view> |
| | | <view class="search_wrap"> |
| | | <image class="mr12 search" src="@/static/home/ic_search@2x.png" mode="widthFix"></image> |
| | | <input v-model="searchValue" @confirm="getDevice()" type="text" placeholder="搜索设备名称/编号" placeholder-class="placeholder9" /> |
| | | <input v-model="searchValue" @confirm="getDevice()" type="text" placeholder="搜索设备名称/编号"
|
| | | placeholder-class="placeholder9" />
|
| | | </view> |
| | | <view class="modal_list"> |
| | | <view class="item" v-for="item,i in deviceList" @click="deviceClick(item)"> |
| | |
| | | <view class="sub_btn" @click="handleDevice">确定选择</view> |
| | | </view> |
| | | </u-popup>
|
| | | <!-- -->
|
| | | <view class="reader-box" @click="stopScan" v-if="isScaning">
|
| | | <view class="reader" id="reader"></view>
|
| | | </view>
|
| | | </view>
|
| | | </template>
|
| | |
|
| | |
| | | ywDeviceCreate |
| | | } from '@/api' |
| | | import dayjs from 'dayjs';
|
| | | import {
|
| | | Html5Qrcode
|
| | | } from 'html5-qrcode';
|
| | | export default {
|
| | | data() {
|
| | | return {
|
| | | param: {status: 0}, |
| | | param: {
|
| | | status: 0
|
| | | },
|
| | | showUpload: false, |
| | | showModal: false, |
| | | fileList: [], |
| | | |
| | | searchValue: '', |
| | | deviceList: [], |
| | | activeDevice: {}
|
| | | activeDevice: {},
|
| | |
|
| | | html5Qrcode: null,
|
| | | isScaning: false,
|
| | | };
|
| | | }, |
| | | onLoad() { |
| | |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | const { param, fileList } = this |
| | | const {
|
| | | param,
|
| | | fileList
|
| | | } = this
|
| | | |
| | | if(!param.deviceId) return this.showToast('请先选择要维护的设备') |
| | | ywDeviceCreate({ |
| | |
| | | }) |
| | | }, |
| | | handleDevice() { |
| | | const { activeDevice } = this |
| | | const {
|
| | | activeDevice
|
| | | } = this
|
| | | if(!activeDevice.id) return this.showToast('请先选择设备') |
| | | this.$set(this.param, 'deviceId', activeDevice.id) |
| | | this.$set(this.param, 'deviceName', activeDevice.name) |
| | |
| | | }); |
| | | } |
| | | }); |
| | | },
|
| | |
|
| | | openQrcode() {
|
| | | this.isScaning = true;
|
| | | Html5Qrcode.getCameras().then((devices) => {
|
| | | if (devices && devices.length) {
|
| | | this.html5Qrcode = new Html5Qrcode('reader');
|
| | | this.html5Qrcode.start({
|
| | | facingMode: 'environment'
|
| | | }, {
|
| | | focusMode: 'continuous', //设置连续聚焦模式
|
| | | fps: 5, //设置扫码识别速度
|
| | | qrbox: 280 //设置二维码扫描框大小
|
| | | },
|
| | | (decodeText, decodeResult) => {
|
| | | if (decodeText) { //这里decodeText就是通过扫描二维码得到的内容
|
| | | this.action(decodeText) //对二维码逻辑处理
|
| | | this.stopScan(); //关闭扫码功能
|
| | | }
|
| | | },
|
| | | (err) => {
|
| | | // console.log(err); //错误信息
|
| | | }
|
| | | );
|
| | | }
|
| | | });
|
| | | },
|
| | |
|
| | | stopScan() {
|
| | | console.log('停止扫码')
|
| | | this.isScaning = false;
|
| | | if (this.html5Qrcode) {
|
| | | this.html5Qrcode.stop();
|
| | | }
|
| | | } |
| | | }
|
| | | }
|
| | |
| | | .line {
|
| | | display: flex; |
| | | align-items: center; |
| | |
|
| | | .icon{ |
| | | width: 52rpx; |
| | | height: 52rpx; |
| | | margin-left: 40rpx; |
| | | }
|
| | |
|
| | | textarea {
|
| | | box-sizing: border-box;
|
| | | width: 690rpx;
|
| | |
| | | align-items: center;
|
| | | border-bottom: 1rpx solid #E5E5E5;
|
| | | }
|
| | |
|
| | | .radio_wrap{ |
| | | margin-top: 20rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | |
|
| | | .ite{ |
| | | width: 216rpx; |
| | | height: 68rpx; |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | |
|
| | | .active{ |
| | | color: $primaryColor; |
| | | border-color: $primaryColor; |
| | | background: rgba(0,104,255,0.1); |
| | | } |
| | | }
|
| | |
|
| | | .upload_wrap {
|
| | | display: flex;
|
| | | flex-wrap: wrap;
|
| | |
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | .sel_upload_wrap {
|
| | | width: 100%;
|
| | | border-top: 1px solid #333333;
|
| | |
| | | text-align: center;
|
| | | }
|
| | | }
|
| | |
|
| | | .sub_btn {
|
| | | position: fixed;
|
| | | bottom: 68rpx;
|
| | |
| | | font-size: 32rpx;
|
| | | color: #FFFFFF;
|
| | | }
|
| | |
|
| | | .appr_modal { |
| | | padding: 36rpx 30rpx 0; |
| | | height: calc( 100vh - 120rpx ); |
| | |
|
| | | .title { |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | |
| | | background: #f2f2f2; |
| | | border-radius: 38rpx; |
| | | padding-left: 30rpx; |
| | |
|
| | | input{ |
| | | flex: 1; |
| | | } |
| | |
|
| | | .search { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | } |
| | | } |
| | |
|
| | | .modal_list{ |
| | | height: calc( 100% - 360rpx ); |
| | |
|
| | | .item{ |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | height: 100rpx; |
| | | font-size: 30rpx; |
| | | border-bottom: 1px solid #E5E5E5; |
| | |
|
| | | image{ |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | } |
| | |
|
| | | .active{ |
| | | color: $primaryColor; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
|
| | | .reader-box {
|
| | | position: fixed;
|
| | | top: 0;
|
| | | bottom: 0;
|
| | | left: 0;
|
| | | right: 0;
|
| | | background-color: rgba(0, 0, 0, 0.5);
|
| | | }
|
| | |
|
| | | .reader {
|
| | | width: 100%;
|
| | | // width: 540rpx;
|
| | | // height: 540rpx;
|
| | | position: absolute;
|
| | | top: 50%;
|
| | | left: 50%;
|
| | | transform: translate(-50%, -50%);
|
| | | }
|
| | | </style> |