From b2e8e233d59d107615a8336dce9da36f1f8bcde0 Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期二, 03 十二月 2024 16:46:47 +0800 Subject: [PATCH] ll --- h5/pages/polling/detail.vue | 20 h5/pages/workOrder/edit.vue | 183 +++++++--- admin/src/views/Inspection/task.vue | 39 - h5/pages/operation/device.vue | 4 admin/src/views/project/components/buildingDetail.vue | 2 h5/pages/polling/task.vue | 14 h5/api/yw.js | 7 admin/src/views/operation/components/deviceDetail.vue | 211 +++++++++++ admin/src/views/operation/components/maintain.vue | 5 h5/pages/workOrder/detail.vue | 11 h5/pages/polling/point.vue | 236 ++++++++---- admin/src/views/client/components/OperaYwCustomerWindow.vue | 6 admin/src/views/workorder/workorderList.vue | 14 admin/src/views/Inspection/components/taskDetail.vue | 16 admin/src/views/operation/components/deviceEdit.vue | 1 admin/src/views/operation/device.vue | 17 h5/manifest.json | 2 h5/pages.json | 2 admin/src/views/Inspection/components/OperaYwPatrolPointWindow.vue | 6 admin/src/views/project/components/OperaYwRoomWindow.vue | 14 admin/src/components/business/OperaInternalCompanyWindow.vue | 8 admin/src/views/Inspection/plan.vue | 19 h5/pages/workOrder/list.vue | 134 ++++--- admin/src/views/project/housingList.vue | 16 admin/src/components/common/GlobalWindow.vue | 2 admin/src/views/operation/components/maintainDetail.vue | 2 admin/src/views/business/internalCompany.vue | 6 h5/App.vue | 13 admin/src/views/Inspection/components/OperaYwPatrolLineWindow.vue | 36 + admin/src/views/Inspection/path.vue | 5 admin/src/components/common/GlobalRigthWindow.vue | 2 31 files changed, 734 insertions(+), 319 deletions(-) diff --git a/admin/src/components/business/OperaInternalCompanyWindow.vue b/admin/src/components/business/OperaInternalCompanyWindow.vue index 9198f65..984e196 100644 --- a/admin/src/components/business/OperaInternalCompanyWindow.vue +++ b/admin/src/components/business/OperaInternalCompanyWindow.vue @@ -4,6 +4,7 @@ :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm" + width="600px" > <el-form :model="form" ref="form" :rules="rules"> <el-form-item label="涓婄骇缁勭粐" > @@ -15,12 +16,11 @@ <el-form-item label="缁勭粐鍚嶇О" prop="name"> <el-input v-model="form.name" placeholder="璇疯緭鍏ョ粍缁囧悕绉�" v-trim/> </el-form-item> - <el-form-item label="缁勭粐绫诲瀷" prop="type"> + <!-- <el-form-item label="缁勭粐绫诲瀷" prop="type"> <el-radio-group v-model="form.type" :disabled="form.parentType == 0"> -<!-- <el-radio :label="0">鐩稿叧鏂圭粍缁�</el-radio>--> <el-radio :label="1">鍐呴儴缁勭粐</el-radio> </el-radio-group> - </el-form-item> + </el-form-item> --> </el-form> </GlobalWindow> </template> @@ -39,7 +39,7 @@ // 琛ㄥ崟鏁版嵁 form: { id: null, - type: '0', + type: '2', name: '', parentId: null, disable: false, diff --git a/admin/src/components/common/GlobalRigthWindow.vue b/admin/src/components/common/GlobalRigthWindow.vue index 8cbe166..c6f4020 100644 --- a/admin/src/components/common/GlobalRigthWindow.vue +++ b/admin/src/components/common/GlobalRigthWindow.vue @@ -72,7 +72,7 @@ // 杈撳叆妗嗛珮搴� $input-height: 32px; .global-window { - top: 56px !important; + top: 0; left: 218px !important; // 澶撮儴鏍囬 ::v-deep .el-drawer__header { diff --git a/admin/src/components/common/GlobalWindow.vue b/admin/src/components/common/GlobalWindow.vue index 4ae9ce1..376a5b7 100644 --- a/admin/src/components/common/GlobalWindow.vue +++ b/admin/src/components/common/GlobalWindow.vue @@ -87,7 +87,7 @@ // 杈撳叆妗嗛珮搴� $input-height: 32px; .global-window { - top: 56px !important; + top: 0; left: 250px !important; // 澶撮儴鏍囬 ::v-deep .el-drawer__header { diff --git a/admin/src/views/Inspection/components/OperaYwPatrolLineWindow.vue b/admin/src/views/Inspection/components/OperaYwPatrolLineWindow.vue index 2d2b991..64040ec 100644 --- a/admin/src/views/Inspection/components/OperaYwPatrolLineWindow.vue +++ b/admin/src/views/Inspection/components/OperaYwPatrolLineWindow.vue @@ -56,10 +56,10 @@ <el-table-column type="selection" width="55" align="center" /> <el-table-column prop="code" label="宸℃鐐圭紪鐮�" min-width="100px"></el-table-column> <el-table-column prop="name" label="宸℃鐐瑰悕绉�" min-width="100px"></el-table-column> - <el-table-column prop="deviceName" label="宸℃鐐瑰悕绉�" min-width="100px"></el-table-column> - <el-table-column prop="areaName" label="宸℃鐐瑰悕绉�" min-width="100px"></el-table-column> + <el-table-column prop="deviceName" label="鍏宠仈璁惧" min-width="100px"></el-table-column> + <el-table-column prop="areaName" label="宸℃鍖哄煙" min-width="100px"></el-table-column> </el-table> - <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="pagination"> + <pagination class="mt10" @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="pagination"> </pagination> <span slot="footer" class="dialog-footer"> @@ -75,7 +75,7 @@ import GlobalWindow from '@/components/common/GlobalWindow' import Pagination from '@/components/common/Pagination' import { fetchList as getFetchList } from '@/api/Inspection/ywPatrolPoint' -import { create,updateById, detailById } from '@/api/Inspection/ywPatrolLine' +import { create, updateById, detailById } from '@/api/Inspection/ywPatrolLine' import { Message } from 'element-ui' import { fetchList } from '@/api/business/category' export default { @@ -127,7 +127,7 @@ if (list.length == 0) return Message.warning('璇峰厛閫夋嫨宸℃鐐�') form.linePointList = list this.isWorking = true - let fn = form.id ? updateById : create + let fn = form.id ? updateById : create fn({ ...form }).then(res => { Message.success('淇濆瓨鎴愬姛') this.isWorking = false @@ -155,7 +155,6 @@ }) }, initData() { - this.list = [] const { searchForm, pagination } = this getFetchList({ page: pagination.page, @@ -193,8 +192,8 @@ }, openModal() { - this.selPoint = this.list.map(i => i.id) this.getProject() + this.reset() this.isShowModal = true }, changeSel(e) { @@ -206,12 +205,23 @@ this.initData() }, subModal() { - this.list = this.selList.map(item => { - return { - needScancode: 0, - pointName: item.name, - pointId: item.id, - code: item.code + // this.list = this.selList.map(item => { + // return { + // needScancode: 0, + // pointName: item.name, + // pointId: item.id, + // code: item.code + // } + // }) + this.selList.forEach(item => { + const index = this.list.findIndex(i => i.code === item.code) + if (index === -1) { + this.list.push({ + needScancode: 0, + pointName: item.name, + pointId: item.id, + code: item.code + }) } }) this.isShowModal = false diff --git a/admin/src/views/Inspection/components/OperaYwPatrolPointWindow.vue b/admin/src/views/Inspection/components/OperaYwPatrolPointWindow.vue index aa26f0f..d17b360 100644 --- a/admin/src/views/Inspection/components/OperaYwPatrolPointWindow.vue +++ b/admin/src/views/Inspection/components/OperaYwPatrolPointWindow.vue @@ -21,11 +21,11 @@ }"></el-cascader> </el-form-item> <el-form-item label="缁忕含搴�"> - <el-input v-model="form.lnglat" disabled v-trim /> + <el-input v-model="form.lnglat" placeholder="绀轰緥锛�117.297461,31.849234" v-trim /> </el-form-item> - <el-form-item> + <!-- <el-form-item> <mapDrag class="mapbox" @center="getCenter" /> - </el-form-item> + </el-form-item> --> <el-form-item label="宸℃鍐呭" prop="content"> <el-input type="textarea" :rows="4" v-model="form.content" placeholder="璇疯緭鍏�" /> </el-form-item> diff --git a/admin/src/views/Inspection/components/taskDetail.vue b/admin/src/views/Inspection/components/taskDetail.vue index 79fd9ca..54b30a5 100644 --- a/admin/src/views/Inspection/components/taskDetail.vue +++ b/admin/src/views/Inspection/components/taskDetail.vue @@ -1,6 +1,6 @@ <template> <GlobalWindow title="宸℃浠诲姟璇︽儏" :showConfirm="false" :visible.sync="isShowModal"> - <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> + <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getDetail(1)" @clear="clear" /> <el-table v-loading="loading" :data="list" stripe> <el-table-column prop="pointName" label="宸℃鐐瑰悕绉�" min-width="100" show-overflow-tooltip /> <el-table-column prop="" label="鐘舵��" min-width="100" show-overflow-tooltip> @@ -9,7 +9,7 @@ <span v-if="row.status == 1">宸插贰妫�</span> </template> </el-table-column> - <el-table-column prop="editor" label="宸℃浜�" min-width="100" show-overflow-tooltip /> + <el-table-column prop="realname" label="宸℃浜�" min-width="100" show-overflow-tooltip /> <el-table-column prop="editDate" label="宸℃鏃堕棿" min-width="100" show-overflow-tooltip /> <el-table-column prop="" label="宸℃缁撴灉" min-width="100" show-overflow-tooltip> <template v-slot="{ row }"> @@ -30,6 +30,7 @@ import QueryForm from '@/components/common/QueryForm' import Pagination from '@/components/common/Pagination' import { getDetail } from '@/api/Inspection/ywPatrolTask' +import dayjs from 'dayjs' export default { components: { GlobalWindow, QueryForm, Pagination }, data() { @@ -41,6 +42,7 @@ page: 1, total: 0 }, + loading:false, filters: {}, list: [], total: 0, @@ -82,11 +84,11 @@ this.loading = false this.list = res.records || [] this.pagination.total = res.total - this.list.forEach(item => { - item.inTypeTemp = item.inType == 0 ? '鏁存墭鐩�' : '浠剁儫' - item.taskOrigin = 'WMS鑾峰彇' - item.workTime = dayjs.duration(item.param3, 'seconds').format('H鏃秏鍒唖绉�') - }) + // this.list.forEach(item => { + // item.inTypeTemp = item.inType == 0 ? '鏁存墭鐩�' : '浠剁儫' + // item.taskOrigin = 'WMS鑾峰彇' + // item.workTime = dayjs.duration(item.param3, 'seconds').format('H鏃秏鍒唖绉�') + // }) this.pagination.total = res.total || 0 }, () => { this.loading = false diff --git a/admin/src/views/Inspection/path.vue b/admin/src/views/Inspection/path.vue index 4bab064..03a0a18 100644 --- a/admin/src/views/Inspection/path.vue +++ b/admin/src/views/Inspection/path.vue @@ -17,8 +17,8 @@ <ul class="toolbar" v-permissions="['business:ywpatrolline:create', 'business:ywpatrolline:delete']"> <li><el-button type="primary" @click="editClick()" icon="el-icon-plus" v-permissions="['business:ywpatrolline:create']">鏂板缓</el-button></li> - <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" - v-permissions="['business:ywpatrolline:delete']">鍒犻櫎</el-button></li> + <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" + v-permissions="['business:ywpatrolline:delete']">鍒犻櫎</el-button></li> --> </ul> <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55"></el-table-column> @@ -105,6 +105,7 @@ } else { this.$refs.operaYwPatrolLineWindow.open('鏂板缓宸℃绾胯矾') } + this.$refs.operaYwPatrolLineWindow.list = [] this.$refs.operaYwPatrolLineWindow.initData() }, diff --git a/admin/src/views/Inspection/plan.vue b/admin/src/views/Inspection/plan.vue index 6320d32..2dcd367 100644 --- a/admin/src/views/Inspection/plan.vue +++ b/admin/src/views/Inspection/plan.vue @@ -12,8 +12,6 @@ <section> <el-button type="primary" @click="search">鎼滅储</el-button> - <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywpatrolscheme:exportExcel']" - @click="exportExcel">瀵煎嚭</el-button> <el-button @click="reset">閲嶇疆</el-button> </section> </el-form> @@ -22,6 +20,8 @@ <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> <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:ywpatrolscheme:delete']">鍒犻櫎</el-button></li> --> </ul> @@ -52,7 +52,8 @@ </el-table-column> <el-table-column label="鐘舵��" min-width="100px"> <template v-slot="scope"> - <el-switch v-model="scope.row.status" @change="e => changeStatus(scope.row)" :active-value="0" :inactive-value="1"> + <el-switch v-model="scope.row.status" @change="e => changeStatus(scope.row)" :active-value="0" + :inactive-value="1"> </el-switch> </template> </el-table-column> @@ -89,7 +90,7 @@ return { // 鎼滅储 searchForm: { - title: '' + title: '' } } }, @@ -104,7 +105,7 @@ }, methods: { changeStatus(e) { - console.log(e); + console.log(e) updateStatusById(e).then(res => { this.search() Message.success('鐘舵�佷慨鏀规垚鍔�') @@ -113,14 +114,14 @@ }) }, changeDate(e) { - if(e && e.length > 0){ + if (e && e.length > 0) { this.$set(this.searchForm, 'startDate', e[0]) this.$set(this.searchForm, 'endDate', e[1]) - }else{ + } else { this.$set(this.searchForm, 'startDate', '') this.$set(this.searchForm, 'endDate', '') } - + }, reset() { this.searchForm = {} @@ -134,7 +135,7 @@ this.$refs.operaYwPatrolSchemeWindow.open('鏂板缓宸℃璁″垝') } this.$refs.operaYwPatrolSchemeWindow.initData() - + }, } } diff --git a/admin/src/views/Inspection/task.vue b/admin/src/views/Inspection/task.vue index b11267c..b9fe645 100644 --- a/admin/src/views/Inspection/task.vue +++ b/admin/src/views/Inspection/task.vue @@ -16,25 +16,25 @@ </el-form-item> <section> <el-button type="primary" @click="search">鎼滅储</el-button> - <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywpatroltask:exportExcel']" @click="exportExcel">瀵煎嚭</el-button> + <el-button @click="reset">閲嶇疆</el-button> </section> </el-form> <!-- 琛ㄦ牸鍜屽垎椤� --> <template v-slot:table-wrap> - <el-table - v-loading="isWorking.search" - :data="tableData.list" - stripe - @selection-change="handleSelectionChange" - > + <div> + <el-button type="primary" plain :loading="isWorking.export" + v-permissions="['business:ywpatroltask:exportExcel']" @click="exportExcel">瀵煎嚭</el-button> + </div> + <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55"></el-table-column> <el-table-column prop="planTitle" label="璁″垝鍚嶇О" min-width="100px"></el-table-column> <el-table-column prop="planCode" label="璁″垝缂栧彿" min-width="100px"></el-table-column> <el-table-column prop="code" label="浠诲姟缂栧彿" min-width="100px"></el-table-column> <el-table-column prop="dealDate" label="浠诲姟鏃堕棿" min-width="140px"> <template v-slot="scope"> - <span v-if="scope.row.startDate && scope.row.endDate">{{ scope.row.startDate.slice(0, 16) }} - {{ scope.row.endDate.slice(11, 16) }}</span> + <span v-if="scope.row.startDate && scope.row.endDate">{{ scope.row.startDate.slice(0, 16) }} - {{ + scope.row.endDate.slice(11, 16) }}</span> </template> </el-table-column> <el-table-column prop="dealDate" label="瀹為檯瀹屾垚鏃堕棿" min-width="100px"></el-table-column> @@ -48,23 +48,16 @@ <span class="gray" v-if="scope.row.status == 4">宸插彇娑�</span> </template> </el-table-column> - <el-table-column - v-if="containPermissions(['business:ywpatroltask:update', 'business:ywpatroltask:delete'])" - label="鎿嶄綔" - min-width="120" - fixed="right" - > + <el-table-column v-if="containPermissions(['business:ywpatroltask:update', 'business:ywpatroltask:delete'])" + label="鎿嶄綔" min-width="120" fixed="right"> <template slot-scope="{row}"> <el-button type="text" @click="handleDetail(row)">鏌ョ湅璇︽儏</el-button> - <el-button v-if="row.status == 0" type="text" class="red" @click="cancelById(row)" v-permissions="['business:ywpatroltask:delete']">鍙栨秷</el-button> + <el-button v-if="row.status == 0" type="text" class="red" @click="cancelById(row)" + v-permissions="['business:ywpatroltask:delete']">鍙栨秷</el-button> </template> </el-table-column> </el-table> - <pagination - @size-change="handleSizeChange" - @current-change="handlePageChange" - :pagination="tableData.pagination" - > + <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> </pagination> </template> <!-- --> @@ -83,16 +76,16 @@ name: 'YwPatrolTask', extends: BaseTable, components: { TableLayout, Pagination, TaskDetail }, - data () { + data() { return { // 鎼滅储 searchForm: { - title:'', + title: '', status: '' } } }, - created () { + created() { this.config({ module: '杩愮淮宸℃浠诲姟淇℃伅琛�', api: '/Inspection/ywPatrolTask', diff --git a/admin/src/views/business/internalCompany.vue b/admin/src/views/business/internalCompany.vue index 82e522b..2db8298 100644 --- a/admin/src/views/business/internalCompany.vue +++ b/admin/src/views/business/internalCompany.vue @@ -32,12 +32,12 @@ default-expand-all> <el-table-column type="selection" width="55"></el-table-column> <el-table-column prop="name" label="缁勭粐鍚嶇О" min-width="100px"></el-table-column> - <el-table-column prop="name" label="缁勭粐绫诲瀷" min-width="80px"> + <!-- <el-table-column prop="name" label="缁勭粐绫诲瀷" min-width="80px"> <template scope="{row}"> <span v-if="row.type == 0">鐩稿叧鏂圭粍缁�</span> <span v-if="row.type == 1">鍐呴儴缁勭粐</span> </template> - </el-table-column> + </el-table-column> --> <el-table-column prop="companyNamePath" label="缁勭粐璺緞" min-width="100px"></el-table-column> <el-table-column prop="editorName" label="鎿嶄綔浜�" min-width="100px"></el-table-column> <el-table-column prop="editDate" label="鏈�鍚庢洿鏂版椂闂�" min-width="100px"></el-table-column> @@ -73,7 +73,7 @@ loading: false, sorting: false, searchForm: { - // type: 1 + type: 2 }, list: [], total: 0 diff --git a/admin/src/views/client/components/OperaYwCustomerWindow.vue b/admin/src/views/client/components/OperaYwCustomerWindow.vue index bbfb6b6..d3c0941 100644 --- a/admin/src/views/client/components/OperaYwCustomerWindow.vue +++ b/admin/src/views/client/components/OperaYwCustomerWindow.vue @@ -212,18 +212,18 @@ // 缂栬緫 this.$nextTick(() => { if (title == '缂栬緫瀹㈡埛') { - this.getClient() + this.getClient(target.id) detailById(target.id).then(res => { this.form = res }) } }) }, - getClient() { + getClient(customerId) { fetchList({ capacity: 9999, page: 1, - model: {} + model: {customerId} }).then(res => { this.clientList = res.records }) diff --git a/admin/src/views/operation/components/deviceDetail.vue b/admin/src/views/operation/components/deviceDetail.vue new file mode 100644 index 0000000..5dad8e6 --- /dev/null +++ b/admin/src/views/operation/components/deviceDetail.vue @@ -0,0 +1,211 @@ +<template> + <GlobalWindow width="720px" title="宸ュ崟璇︽儏" :visible.sync="visible" :confirm-working="isWorking" @close="close" + @confirm="confirm"> + <div class="main"> + <div class="title"> + <span>鍩虹淇℃伅</span> + </div> + <div class="main_content"> + <div class="list"> + <div class="item"> + <div class="la">璁惧缂栫爜</div> + <div class="val">{{ info.code }}</div> + </div> + <div class="item"> + <div class="la">璁惧鍚嶇О</div> + <div class="val">{{ info.name }}</div> + </div> + <div class="item"> + <div class="la">璁惧鍨嬪彿</div> + <div class="val">{{ info.modelNo }}</div> + </div> + <div class="item"> + <div class="la">璁惧鍒嗙被</div> + <div class="val">{{ info.categoryName }}</div> + </div> + <div class="item"> + <div class="la">璁惧绠$悊鍛�</div> + <div class="val">{{ info.realName }}</div> + </div> + <div class="item"> + <div class="la">鎵�鍦ㄤ綅缃�</div> + <div class="val">{{ info.addr }}</div> + </div> + <div class="item"> + <div class="la">璁惧鐘舵��</div> + <spa class="val" v-if="info.status == 0">姝e父</spa> + <spa class="val" v-if="info.status == 1">鎹熷潖</spa> + <spa class="val" v-if="info.status == 2">鎶ュ簾</spa> + </div> + <div class="item"> + <div class="la">渚涘簲鍟�</div> + <div class="val">{{ info.supplier }}</div> + </div> + <div class="item" v-if="info.content" style="width: 100%;"> + <div class="la">杩愮淮鍐呭</div> + <div class="val">{{ info.content }}</div> + </div> + <div v-if="info.fileFullUrl" class="item" style="width: 100%;"> + <div class="la">鐓х墖</div> + <div class="val"> + <img class="photo" :src="info.fileFullUrl" alt=""> + </div> + </div> + </div> + </div> + </div> + </GlobalWindow> +</template> + +<script> +import GlobalWindow from '@/components/common/GlobalWindow' +import BaseOpera from '@/components/base/BaseOpera' +import { detailById } from '@/api/Inspection/device.js' +import { getUserList } from '@/api/system/user' +import { Message, Loading } from 'element-ui' +export default { + components: { + GlobalWindow + }, + extends: BaseOpera, + data() { + return { + id: '', + visible: false, + info: {}, + + } + }, + methods: { + getDetail() { + const { id } = this + detailById(id).then(res => { + this.info = res + }) + }, + close() { + this.visible = false + this.$emit('close') + } + } +} +</script> + +<style lang="scss" scoped> +@import '@/assets/style/variables.scss'; + +.main { + padding-top: 20px; + + .title { + font-weight: 500; + font-size: 18px; + color: $primary-color; + margin-bottom: 10px; + display: flex; + align-items: center; + + .status { + padding: 0 6px; + height: 22px; + line-height: 22px; + border-radius: 2px; + border: 1px solid #00BA92; + color: #00BA92; + font-weight: 400; + font-size: 12px; + margin-left: 10px; + } + + .primaryColor { + border: 1px solid $primary-color; + } + + .gray { + color: gray; + border: 1px solid gray; + } + } + + .list { + display: flex; + flex-wrap: wrap; + /* background: #F7F7F7; */ + border-radius: 2px; + padding: 15px 20px; + margin-bottom: 16px; + width: 100%; + + .item { + width: 33.3%; + margin-bottom: 12px; + + .photo { + width: 92px; + height: 92px; + } + + .la { + color: #7f7f7f; + margin-top: 2px; + } + } + + .item2 { + width: 100%; + display: flex; + align-items: center; + } + + .max { + width: 100%; + } + } + + .main_content { + display: flex; + width: 100%; + } +} + +.file_list { + display: flex; + flex-wrap: wrap; + + .avatar-uploader { + width: 92px; + height: 92px; + display: flex; + justify-content: center; + align-items: center; + border: 1px dashed #d9d9d9; + } + + .item { + width: 92px; + max-height: 92px; + margin-left: 10px; + position: relative; + border: 1px dashed #d9d9d9; + border-radius: 4px; + display: flex; + align-items: center; + justify-content: center; + + .close { + font-size: 20px; + position: absolute; + right: -10px; + top: -10px; + z-index: 111; + color: red; + cursor: pointer; + } + + .img { + width: 92px; + max-height: 92px; + } + } +} +</style> diff --git a/admin/src/views/operation/components/deviceEdit.vue b/admin/src/views/operation/components/deviceEdit.vue index 016870d..4c5c8f7 100644 --- a/admin/src/views/operation/components/deviceEdit.vue +++ b/admin/src/views/operation/components/deviceEdit.vue @@ -30,7 +30,6 @@ </el-form-item> <el-form-item label="渚涘簲鍟�" prop=""> <el-input v-model="param.supplier" placeholder="璇疯緭鍏�" v-trim /> - </el-form-item> <el-form-item label="杩愮淮鍐呭" prop=""> <el-input type="textarea" :rows="4" v-model="param.content" placeholder="璇疯緭鍏�" /> diff --git a/admin/src/views/operation/components/maintain.vue b/admin/src/views/operation/components/maintain.vue index a1d0879..65f82ea 100644 --- a/admin/src/views/operation/components/maintain.vue +++ b/admin/src/views/operation/components/maintain.vue @@ -55,6 +55,7 @@ import { getUserList } from '@/api/system/user' import { create, updateById } from '@/api/Inspection/deviceRecord' import { Message, Loading } from 'element-ui' +import dayjs from 'dayjs' export default { components: { GlobalWindow, UploadAvatarImage }, data() { @@ -65,6 +66,7 @@ deviceList: [], staffList: [], rules: { + dealDate: [{ required: true, message: '璇烽�夋嫨' }], deviceId: [{ required: true, message: '璇烽�夋嫨' }], content: [{ required: true, message: '璇疯緭鍏�' }], // code: [{ required: true, message: '璇疯緭鍏�' }], @@ -74,13 +76,14 @@ uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/uploadBatch', fileList: [], uploadData: { - folder: 'HIDDEN_DANGER_FILE' + folder: 'YW_DEVICE' }, } }, created() { this.initData() + this.$set(this.param, 'dealDate', dayjs().format('YYYY-MM-DD HH:mm:ss')) }, methods: { handleSub() { diff --git a/admin/src/views/operation/components/maintainDetail.vue b/admin/src/views/operation/components/maintainDetail.vue index e9d85b1..0ab9cd3 100644 --- a/admin/src/views/operation/components/maintainDetail.vue +++ b/admin/src/views/operation/components/maintainDetail.vue @@ -18,7 +18,7 @@ </div> <div class="item"> <div class="la">杩愮淮浜�</div> - <div class="val">{{ info.realName }}</div> + <div class="val">{{ info.realName }}-{{ info.companyName }}</div> </div> <div class="item"> <div class="la">杩愮淮浜虹數璇�</div> diff --git a/admin/src/views/operation/device.vue b/admin/src/views/operation/device.vue index da4d4e9..9025984 100644 --- a/admin/src/views/operation/device.vue +++ b/admin/src/views/operation/device.vue @@ -19,8 +19,9 @@ <span v-if="row.status == 2">鎶ュ簾</span> </template> </el-table-column> - <el-table-column label="鎿嶄綔" min-width="120" fixed="right"> + <el-table-column label="鎿嶄綔" min-width="130" fixed="right"> <template slot-scope="{row}"> + <el-button type="text" @click="handleDetail(row)" v-permissions="['business:category:update']">鏌ョ湅璇︽儏</el-button> <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit" v-permissions="['business:category:update']">缂栬緫</el-button> <el-button type="text" @click="handleDel(row)" icon="el-icon-delete" @@ -32,6 +33,7 @@ <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> </div> <Edit v-if="showEdit" ref="EditRef" @success="getList" @close="showEdit = false" /> + <Detail ref="DetailRef" /> </div> </template> @@ -39,12 +41,14 @@ import Pagination from '@/components/common/Pagination' import QueryForm from '@/components/common/QueryForm' import Edit from './components/deviceEdit' +import Detail from './components/deviceDetail' import { fetchList, deleteById } from '@/api/Inspection/device' export default { components: { Pagination, QueryForm, - Edit + Edit, + Detail }, data() { return { @@ -105,13 +109,18 @@ this.loading = false }) }, + handleDetail(row) { + this.$refs.DetailRef.visible = true + this.$refs.DetailRef.id = row.id + this.$refs.DetailRef.getDetail() + }, handleEdit(row) { this.showEdit = true this.$nextTick(() => { this.$refs.EditRef.isShowModal = true if (row && row.id) { - console.log('---'); - + console.log('---') + this.$refs.EditRef.getDetail(row.id) } }) diff --git a/admin/src/views/project/components/OperaYwRoomWindow.vue b/admin/src/views/project/components/OperaYwRoomWindow.vue index cdfdf2d..dc0c159 100644 --- a/admin/src/views/project/components/OperaYwRoomWindow.vue +++ b/admin/src/views/project/components/OperaYwRoomWindow.vue @@ -23,7 +23,7 @@ <el-input v-model="form.code" placeholder="璇疯緭鍏ユ埧闂寸紪鍙�" v-trim /> </el-form-item> <el-form-item label="鏄惁鎷涘晢" prop="isInvestment"> - <el-switch v-model="form.isInvestment" active-value="1" inactive-value="0"> + <el-switch v-model="form.isInvestment" :active-value="1" :inactive-value="0"> </el-switch> </el-form-item> <el-form-item label="寤虹瓚闈㈢Н(m虏)" prop="area"> @@ -67,7 +67,7 @@ imgurl: '', code: '', roomNum: '', - isInvestment: '0', + isInvestment: 0, area: '', feeArea: '', rentArea: '', @@ -115,6 +115,16 @@ this.getDetail(target.id) }) }, + confirm () { + if(!this.form.feeArea){ + this.form.feeArea = this.form.rentArea + } + if (this.form.id == null || this.form.id === '') { + this.__confirmCreate() + return + } + this.__confirmEdit() + }, getDetail(id) { detailById(id).then(res => { this.form = res || {} diff --git a/admin/src/views/project/components/buildingDetail.vue b/admin/src/views/project/components/buildingDetail.vue index 8cfd9c0..594bf1b 100644 --- a/admin/src/views/project/components/buildingDetail.vue +++ b/admin/src/views/project/components/buildingDetail.vue @@ -9,7 +9,7 @@ </div> <div class="item"> <div class="la">妤煎畤鍚嶇О</div> - <div class="val">{{ info.buildingName }}</div> + <div class="val">{{ info.buildingName || info.name }}</div> </div> <div class="item"> <div class="la">妤煎畤缂栫爜</div> diff --git a/admin/src/views/project/housingList.vue b/admin/src/views/project/housingList.vue index f800cc8..b5becde 100644 --- a/admin/src/views/project/housingList.vue +++ b/admin/src/views/project/housingList.vue @@ -17,8 +17,8 @@ </el-form-item> <section> <el-button type="primary" @click="search">鎼滅储</el-button> - <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywroom:exportExcel']" - @click="exportExcel">瀵煎嚭</el-button> + <!-- <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywroom:exportExcel']" + @click="exportExcel">瀵煎嚭</el-button> --> <el-button @click="reset">閲嶇疆</el-button> </section> </el-form> @@ -27,8 +27,8 @@ <ul class="toolbar" v-permissions="['business:ywroom:create', 'business:ywroom:delete']"> <li><el-button type="primary" @click="editClick()" icon="el-icon-plus" v-permissions="['business:ywroom:create']">鏂板缓</el-button></li> - <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" - v-permissions="['business:ywroom:delete']">鍒犻櫎</el-button></li> + <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" + v-permissions="['business:ywroom:delete']">鍒犻櫎</el-button></li> --> </ul> <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55"></el-table-column> @@ -38,7 +38,13 @@ <el-table-column prop="roomNum" label="鎴垮彿" min-width="60px"></el-table-column> <el-table-column prop="rentArea" label="璁$闈㈢Н(m虏)" min-width="80px"></el-table-column> <el-table-column prop="feeArea" label="璁¤垂闈㈢Н(m虏)" min-width="80px"></el-table-column> - <el-table-column prop="feeArea" label="绉熻祦鐘舵��" min-width="80px"></el-table-column> + <el-table-column prop="" label="绉熻祦鐘舵��" min-width="80px"> + <template v-slot="{row}"> + <span v-if="row.leaseStatus == 0">寰呯璧�</span> + <span v-if="row.leaseStatus == 1">宸茬璧�</span> + <span v-if="row.leaseStatus == 2">鏈紑鍚璧�</span> + </template> + </el-table-column> <el-table-column prop="isInvestment" label="鎷涘晢鐘舵��" min-width="60px"> <template v-slot="scope"> <span v-if="scope.row.isInvestment == 1" class="green">鎷涘晢</span> diff --git a/admin/src/views/workorder/workorderList.vue b/admin/src/views/workorder/workorderList.vue index bd27db2..2444c86 100644 --- a/admin/src/views/workorder/workorderList.vue +++ b/admin/src/views/workorder/workorderList.vue @@ -2,7 +2,7 @@ <TableLayout :permissions="['business:ywworkorder:query']"> <!-- 鎼滅储琛ㄥ崟 --> <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> - <el-form-item prop="areaType" label="浣嶇疆绫诲埆"> + <el-form-item prop="areaType" label="浣嶇疆绫诲瀷"> <el-select v-model="searchForm.areaType"> <el-option label="瀹ゅ唴缁翠慨" value="0"></el-option> <el-option label="鍏叡缁翠慨" value="1"></el-option> @@ -45,7 +45,7 @@ @click="exportExcel" plain>瀵煎嚭</el-button> </ul> <el-table v-loading="isWorking.search" :data="tableData.list" stripe> - <el-table-column prop="areaType" label="浣嶇疆绫诲瀷" min-width="80px"> + <el-table-column prop="areaType" label="浣嶇疆绫诲瀷" min-width="70px"> <template v-slot="scope"> <span v-if="scope.row.areaType == 0">瀹ゅ唴瑁呬慨</span> <span v-if="scope.row.areaType == 1">鍏叡鍖哄煙</span> @@ -57,18 +57,18 @@ }}</span> </template> </el-table-column> - <el-table-column prop="categoryName" label="鐗╁搧绫诲瀷" min-width="100px"></el-table-column> - <el-table-column prop="creatorName" label="涓婃姤浜�" min-width="100px"></el-table-column> + <el-table-column prop="categoryName" label="宸ュ崟鍒嗙被" min-width="100px"></el-table-column> + <el-table-column prop="creatorName" label="涓婃姤浜�" min-width="80px"></el-table-column> <el-table-column prop="createDate" label="涓婃姤鏃堕棿" min-width="100px"></el-table-column> - <el-table-column prop="dealUserName" label="澶勭悊浜�" min-width="100px"></el-table-column> - <el-table-column label="宸ュ崟鐘舵��" min-width="100px"> + <el-table-column prop="dealUserName" label="澶勭悊浜�" min-width="80px"></el-table-column> + <el-table-column label="宸ュ崟鐘舵��" min-width="70px"> <template slot-scope="{row}"> <span v-if="row.dealStatus == 0">寰呮寚娲�</span> <span v-if="row.dealStatus == 1">宸叉寚娲�</span> <span v-if="row.dealStatus == 2">宸插鐞�</span> </template> </el-table-column> - <el-table-column v-if="containPermissions(['business:ywworkorder:update'])" label="鎿嶄綔" min-width="80" + <el-table-column v-if="containPermissions(['business:ywworkorder:update'])" label="鎿嶄綔" width="80" fixed="right"> <template slot-scope="{row}"> <span @click="handleDetail(row)" class="primaryColor cu">鏌ョ湅璇︽儏</span> diff --git a/h5/App.vue b/h5/App.vue index 42fad1b..526bb3b 100644 --- a/h5/App.vue +++ b/h5/App.vue @@ -1,7 +1,7 @@ <script> export default { onLaunch: function () { - + // const result = uni.getWindowInfo() }, onShow: function () { console.log('App Show') @@ -15,6 +15,7 @@ <style lang="scss"> /*姣忎釜椤甸潰鍏叡css */ @import "uview-ui/index.scss"; +// @import "./uni_modules/uview-ui/index.scss"; body{ font-size: 28rpx; } @@ -26,6 +27,16 @@ justify-content: space-between; align-items: center; } +.empty_wrap{ + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 100%; + image{ + width: 320rpx; + } +} .bg{ width: 100%; height: 100%; diff --git a/h5/api/yw.js b/h5/api/yw.js index c04116f..acce7d5 100644 --- a/h5/api/yw.js +++ b/h5/api/yw.js @@ -120,4 +120,11 @@ url: 'visitsAdmin/cloudService/business/ywPatrolTaskRecord/patrolData', data }) +} +// 鍒嗙被 +export const getCategoryPost = (data) => { + return http({ + url: 'visitsAdmin/cloudService/business/category/page', + data + }) } \ No newline at end of file diff --git a/h5/manifest.json b/h5/manifest.json index 52b48e9..b905047 100644 --- a/h5/manifest.json +++ b/h5/manifest.json @@ -129,7 +129,7 @@ "/gateway_interface" : { // 杩欎釜瀛楁鍚嶉渶涓庝綘閰嶇疆鐨刡asePrefixUrl涓�鑷达紝绯荤粺璇嗗埆鍒板甫鏈�/dev-api璇锋眰鐨勫湴鍧�鏃讹紝浼氬湪鍓嶉潰鎷兼帴涓婁唬鐞嗘湇鍔″櫒鍦板潃 // "target" : "http://172.20.10.7:10010", // 浠g悊鏈嶅姟鍣ㄥ煙鍚嶆垨IP鍦板潃 - "target" : "http://192.168.0.162:10010", // 浠g悊鏈嶅姟鍣ㄥ煙鍚嶆垨IP鍦板潃 + "target" : "http://192.168.0.163:10010", // 浠g悊鏈嶅姟鍣ㄥ煙鍚嶆垨IP鍦板潃 // "target" : "http://10.50.250.253:8088/gateway_interface", // 浠g悊鏈嶅姟鍣ㄥ煙鍚嶆垨IP鍦板潃 // "target" : "http://192.168.0.173/gateway_interface", // 浠g悊鏈嶅姟鍣ㄥ煙鍚嶆垨IP鍦板潃 "changeOrigin" : true, // 鍏佽璺ㄥ煙 diff --git a/h5/pages.json b/h5/pages.json index af9ee5b..e1958a5 100644 --- a/h5/pages.json +++ b/h5/pages.json @@ -67,7 +67,7 @@ "path" : "pages/polling/detail", "style" : { - "navigationBarTitleText" : "杩愮淮璇︽儏" + "navigationBarTitleText" : "浠诲姟璇︽儏" } }, { diff --git a/h5/pages/operation/device.vue b/h5/pages/operation/device.vue index 02c6b7d..03eb655 100644 --- a/h5/pages/operation/device.vue +++ b/h5/pages/operation/device.vue @@ -61,7 +61,7 @@ </view> <view class="modal_list"> <view class="item" v-for="item,i in deviceList" @click="deviceClick(item)"> - <view class="name">{{ item.name }}</view> + <view class="name">[{{item.code}}] {{ item.name }}</view> <image v-if="activeDevice.id == item.id" src="@/static/radioed.png" mode=""></image> </view> </view> @@ -106,7 +106,7 @@ multifileList: fileList }).then(res => { this.showToast('鎻愪氦鎴愬姛') - // uni.navigateBack() + uni.navigateBack() }) }, getDevice(){ diff --git a/h5/pages/polling/detail.vue b/h5/pages/polling/detail.vue index 4d986a3..41553c2 100644 --- a/h5/pages/polling/detail.vue +++ b/h5/pages/polling/detail.vue @@ -7,13 +7,12 @@ <image v-if="info.status == 2" class="icon" src="@/static/side/ic_dabiaoed.png" mode=""></image> <image v-if="info.status == 3" class="icon" src="@/static/side/ic_dabiao.png" mode=""></image> <view class="head"> - <view class="name">{{ info.title }}</view> + <view class="name">{{ info.title || info.planTitle }}</view> <view class="status" v-if="info.status || info.status == 0" :style="{color: statusM[info.status].color}">{{statusM[info.status].name}}</view> </view> <view class="line"> <view class="la">浠诲姟鏃ユ湡锛�</view> - <view class="val" v-if="info.startDate && info.endDate">{{ info.startDate.slice(0, 11) }} 鑷� - {{ info.endDate.slice(0, 11) }}</view> + <view class="val" v-if="info.startDate">{{ info.startDate.slice(0, 10) }}</view> </view> <view class="line"> <view class="la">鎵ц鏃堕棿锛�</view> @@ -22,7 +21,7 @@ </view> <view class="line"> <view class="la">瀹屾垚鎯呭喌锛�</view> - <view class="val">{{info.finishNum}}/{{info.patrolNum}}</view> + <view class="val">{{info.finishNum || 0}}/{{info.patrolNum}}</view> </view> </view> <view class="title">宸℃鐐瑰垪琛�({{list.length}})</view> @@ -48,7 +47,7 @@ </view> </view> </view> - <view class="footer"> + <view class="footer" v-if="flag"> <view class="sub_btn">鎵爜宸℃</view> </view> </view> @@ -58,13 +57,15 @@ import { ywPatrolDetail, ywPatrolTaskRecord - } from '@/api' + } from '@/api' + import dayjs from 'dayjs'; export default { data() { return { id: '', info: {}, list: [], + flag: false, statusM: [ { color: '#4593f7', name: '寰呭紑濮�' }, { color: '#73e09a', name: '杩涜涓�' }, @@ -81,7 +82,8 @@ this.getDetail() }, methods: { - itemClick(item) { + itemClick(item) { + if(!this.flag) return uni.navigateTo({ url: '/pages/polling/point?id=' + item.id }) @@ -91,7 +93,9 @@ id } = this ywPatrolDetail(id).then(res => { - this.info = res.data + this.info = res.data + let time = new Date(res.data.startDate.slice(0, 10) + ' 00:00:00').getTime() + this.flag = new Date().getTime() > time }) ywPatrolTaskRecord({ capacity: 999, diff --git a/h5/pages/polling/point.vue b/h5/pages/polling/point.vue index 1df5fef..4711fbc 100644 --- a/h5/pages/polling/point.vue +++ b/h5/pages/polling/point.vue @@ -8,7 +8,8 @@ <template v-if="info.status == 1"> <view class="line"> <div class="la">宸℃缁撴灉锛�</div> - <div class="val primaryColor" :class="{red: info.dealStatus == 1}">{{ info.dealStatus == 0 ? '姝e父' : '寮傚父' }}</div> + <div class="val primaryColor" :class="{red: info.dealStatus == 1}">{{ info.dealStatus == 0 ? '姝e父' : '寮傚父' }} + </div> </view> <view class="line"> <div class="la">宸℃鏃堕棿锛�</div> @@ -23,12 +24,12 @@ </view> <!-- --> <view v-if="info.status == 1" class="content"> - <view class="title">宸℃璁板綍</view> - <view class="files"> - <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in info.multifileList" :key="i"> - <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image> - <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video> - </view> + <view class="title">宸℃璁板綍</view> + <view class="files"> + <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in info.multifileList" :key="i"> + <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image> + <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video> + </view> </view> <view class="desc">{{ info.dealInfo }}</view> <view class="line line_s"> @@ -54,7 +55,13 @@ <u-icon name="arrow-right"></u-icon> </view> </view> - + <view class="df_sb"> + <view class="">宸℃缁撴灉</view> + <view class="df_ac" @click="isShowRes = true" v-if="handleParam.dealDate"> + {{ handleParam.dealName }} + <u-icon name="arrow-right"></u-icon> + </view> + </view> <view class="label"> 涓婁紶鍥剧墖/瑙嗛 </view> @@ -74,7 +81,7 @@ <view class="label">澶勭悊璇存槑</view> <textarea v-model="handleParam.dealInfo" placeholder="璇峰~鍐欏鐞嗚鏄�" placeholder-class="placeholder9" /> </view> - </view> + </view> <view class="sub_btn" @click="onSubmit">纭宸℃</view> <!-- --> <u-popup :show="showUpload" @close="showUpload = false" closeOnClickOverlay> @@ -86,52 +93,98 @@ <!-- --> <u-datetime-picker :minDate="new Date().getTime()" :show="isShowHandleDate" @confirm="confirmHandleDate" @cancel="isShowHandleDate = false" mode="datetime"></u-datetime-picker> + <u-picker :show="isShowRes" keyName="name" @cancel="isShowRes = false" @confirm='confirmRes' + :columns="columns"></u-picker> + </view> </template> <script> import { - uploadUrl, - ywPatrolPointDetail, + uploadUrl, + ywPatrolPointDetail, patrolData } from '@/api' import dayjs from 'dayjs'; export default { data() { - return { - id: '', + return { + id: '', info: {}, + isShowRes: false, showUpload: false, isShowHandle: false, isShowHandleDate: false, - handleParam: { - dealStatus: 1 + handleParam: { + dealStatus: 0, + dealName: '姝e父' }, - fileList: [] + fileList: [], + columns: [ + [{ + id: 0, + name: '姝e父' + }, + { + id: 1, + name: '寮傚父' + }, + { + id: '', + name: '璺宠繃' + }, + ] + ], }; - }, - onLoad(option) { - this.id = option.id - this.getDetail() - this.$set(this.handleParam, 'dealDate', dayjs().format('YYYY-MM-DD HH:mm:ss')) + }, + onLoad(option) { + this.id = option.id + this.getDetail() + this.$set(this.handleParam, 'dealDate', dayjs().format('YYYY-MM-DD HH:mm:ss')) }, methods: { - onSubmit() { - const { handleParam, fileList, id } = this - patrolData({ - ...handleParam, - multifileList: fileList, - id, - }).then(res => { - this.showToast('鎿嶄綔鎴愬姛') - uni.navigateBack() + onSubmit() { + const { + handleParam, + fileList, + id + } = this + if (handleParam.dealStatus == 1) { + return uni.showModal({ + title: '娓╅Θ鎻愮ず', + content: '宸℃缁撴灉寮傚父锛屾槸鍚﹀墠寰�鎻愪氦宸ュ崟锛�', + success: function(res) { + if (res.confirm) { + patrolData({ + ...handleParam, + multifileList: fileList, + id, + }).then(res => { + this.showToast('鎿嶄綔鎴愬姛') + uni.navigateBack() + }) + } + } + }); + } else { + patrolData({ + ...handleParam, + multifileList: fileList, + id, + }).then(res => { + this.showToast('鎿嶄綔鎴愬姛') + uni.navigateBack() + }) + } + + }, + getDetail() { + const { + id + } = this + ywPatrolPointDetail(id).then(res => { + this.info = res.data }) - }, - getDetail(){ - const { id } = this - ywPatrolPointDetail(id).then(res => { - this.info = res.data - }) }, callPhone() { uni.makePhoneCall({ @@ -141,6 +194,11 @@ confirmHandleDate(e) { this.$set(this.handleParam, 'dealDate', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')); this.isShowHandleDate = false; + }, + confirmRes(e) { + this.$set(this.handleParam, 'dealStatus', e.value[0].id) + this.$set(this.handleParam, 'dealName', e.value[0].name) + this.isShowRes = false }, fileDel(str, i) { this[str].splice(i, 1); @@ -300,22 +358,24 @@ text-align: center; } } - .sub_btn{ - position: fixed; - bottom: 68rpx; - left: 40rpx; - width: 670rpx; - height: 88rpx; - background: $primaryColor; - box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0,104,255,0.3); - border-radius: 44rpx; - display: flex; - align-items: center; - justify-content: center; - font-weight: 500; - font-size: 32rpx; - color: #FFFFFF; + + .sub_btn { + position: fixed; + bottom: 68rpx; + left: 40rpx; + width: 670rpx; + height: 88rpx; + background: $primaryColor; + box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 104, 255, 0.3); + border-radius: 44rpx; + display: flex; + align-items: center; + justify-content: center; + font-weight: 500; + font-size: 32rpx; + color: #FFFFFF; } + .appr_modal { .label { text { @@ -372,41 +432,43 @@ margin-bottom: 30rpx; } - } - .files{ - display: flex; - margin-bottom: 20rpx; - } - .adduser_list_item_ipt1_upload { - margin-top: 24rpx; - width: 156rpx; - height: 156rpx; - margin-right: 24rpx; - border: 2rpx solid #e5e5e5; - background: #f7f7f7; - color: #666666; - font-size: 22rpx; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - position: relative; - - .close { - position: absolute; - right: -20rpx; - top: -20rpx; - z-index: 9999; - } - - image { - width: 100%; - height: 100%; - } - - video { - width: 100%; - height: 100%; - } + } + + .files { + display: flex; + margin-bottom: 20rpx; + } + + .adduser_list_item_ipt1_upload { + margin-top: 24rpx; + width: 156rpx; + height: 156rpx; + margin-right: 24rpx; + border: 2rpx solid #e5e5e5; + background: #f7f7f7; + color: #666666; + font-size: 22rpx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + position: relative; + + .close { + position: absolute; + right: -20rpx; + top: -20rpx; + z-index: 9999; + } + + image { + width: 100%; + height: 100%; + } + + video { + width: 100%; + height: 100%; + } } </style> \ No newline at end of file diff --git a/h5/pages/polling/task.vue b/h5/pages/polling/task.vue index ee37c83..e93198f 100644 --- a/h5/pages/polling/task.vue +++ b/h5/pages/polling/task.vue @@ -8,11 +8,11 @@ </view> --> <!-- --> <view class="tabs"> - <view class="tab" :class="{active: param.status == 0}" @click="tabsClick(0)"> + <view class="tab" :class="{active: param.queryStatus == '0,1'}" @click="tabsClick('0,1')"> <text>寰呭鐞�</text> <text class="border"></text> </view> - <view class="tab" :class="{active: param.status == 3}" @click="tabsClick(3)"> + <view class="tab" :class="{active: param.queryStatus == 3}" @click="tabsClick(3)"> <text>宸插鐞�</text> <text class="border"></text> </view> @@ -39,10 +39,10 @@ gray: item.status == 3 || item.status == 4 }">{{statusM[item.status]}}</view> </view> - <view class="line" v-if="item.startDate && item.endDate">浠诲姟鏃ユ湡锛歿{ item.startDate.slice(0, 11) }} 鑷� {{ item.endDate.slice(0, 11) }}</view> - <view class="line">鎵ц鏃堕棿锛歿{ item.startDate.slice(11, 16) }} - {{ item.endDate.slice(11, 16) }}</view> + <view class="line" v-if="item.startDate">浠诲姟鏃ユ湡锛歿{ item.startDate.slice(0, 11) }}</view> + <view class="line">鎵ц鏃堕棿锛歿{ item.startDate.slice(11, 16) }} 鑷� {{ item.endDate.slice(11, 16) }}</view> <view class="line"> - <view>瀹屾垚鎯呭喌锛歿{item.finishNum}}/{{item.patrolNum}}</view> + <view>瀹屾垚鎯呭喌锛歿{item.finishNum || 0}}/{{item.patrolNum}}</view> <view class="btn"> <image src="@/static/side/ic_saoma@2x.png" class="saoma" mode=""></image> <view>鎵爜宸℃</view> @@ -61,7 +61,7 @@ data() { return { param: { - status: 0 + queryStatus: '0,1' }, list: [], activeTab: 0, @@ -110,7 +110,7 @@ getList() { const { page, param, selectAll } = this ywPatrolTaskPost({ - model: {...param, dispatchUserId: selectAll ? '' : uni.getStorageSync('userInfo').id, }, + model: {...param, dealUserId: selectAll ? '' : uni.getStorageSync('userInfo').id, }, page, capacity: 10 }).then(res => { diff --git a/h5/pages/workOrder/detail.vue b/h5/pages/workOrder/detail.vue index 5d31a6c..6e74b6a 100644 --- a/h5/pages/workOrder/detail.vue +++ b/h5/pages/workOrder/detail.vue @@ -10,7 +10,7 @@ <view class="desc">{{ info.content }}</view> <view class="file_list"> <view class="file" v-for="(item,index) in info.fileList"> - <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image> + <image v-if="item.type == 0" :src="item.fileurlFull" mode="aspectFill"></image> <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video> </view> </view> @@ -33,14 +33,14 @@ </view> <view class="line" v-if="info.getDate"> <view class="la">涓婇棬鏃堕棿锛�</view> - <view class="val">{{ info.getDate }}</view> + <view class="val">{{ info.getDate.slice(0, 16) }}</view> </view> </view> <view class="result_wrap" v-if="info.dealStatus == 2"> <div class="title">澶勭悊缁撴灉</div> <view v-if="info.dealFileList && info.dealFileList.length > 0" class="file_list"> <view class="file" v-for="item in info.dealFileList"> - <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image> + <image v-if="item.type == 0" :src="item.fileurlFull" mode="aspectFill"></image> <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video> </view> </view> @@ -49,7 +49,7 @@ </view> <view class="line"> <view class="la">澶勭悊浜猴細</view> - <view class="val">{{ info.dealUserName }}</view> + <view class="val">{{ info.dealUserName }}{{info.dealUserCompany ? '-' + info.dealUserCompany : ''}}</view> </view> <view class="line"> <view class="la">澶勭悊鏃堕棿锛�</view> @@ -316,7 +316,8 @@ image, video { - width: 156rpx; + width: 156rpx; + height: 156rpx; } } } diff --git a/h5/pages/workOrder/edit.vue b/h5/pages/workOrder/edit.vue index 2fde8da..f51e237 100644 --- a/h5/pages/workOrder/edit.vue +++ b/h5/pages/workOrder/edit.vue @@ -12,14 +12,25 @@ <view class="item"> <view class="la"><text class="red">*</text>閫夋嫨鍖哄煙</view> <view class="line sel_wrap" @click="showModal1 = true"> - <view class="left" :class="param.projectName ? '' : 'placeholder9'">{{ param.projectName ? `${param.projectName} ${param.buildingName || ''} ${param.areaType == 0 ? param.roomName || '' : param.floorName || ''}` : '璇烽�夋嫨' }}</view> + <view class="left" :class="param.projectName ? '' : 'placeholder9'"> + {{ param.projectName ? `${param.projectName} ${param.buildingName || ''} ${param.areaType == 0 ? param.roomNum || '' : param.floorName || ''}` : '璇烽�夋嫨' }} + </view> + <u-icon name="arrow-right" color="#999999" size="15"></u-icon> + </view> + </view> + <view class="item"> + <view class="la"><text class="red">*</text>宸ュ崟鍒嗙被</view> + <view class="line sel_wrap" @click="showCate1 = true"> + <view class="left" :class="param.cateName ? '' : 'placeholder9'"> + {{ param.cateName ? param.cateName : '璇烽�夋嫨' }}</view> <u-icon name="arrow-right" color="#999999" size="15"></u-icon> </view> </view> <view class="item"> <view class="la">涓婇棬鏃堕棿</view> <view class="line sel_wrap" @click="showTime = true"> - <view class="left" :class="param.getDate ? '' : 'placeholder9'">{{ param.getDate ? param.getDate : '璇烽�夋嫨' }}</view> + <view class="left" :class="param.getDate ? '' : 'placeholder9'">{{ param.getDate ? param.getDate : '璇烽�夋嫨' }} + </view> <u-icon name="arrow-right" color="#999999" size="15"></u-icon> </view> </view> @@ -63,11 +74,14 @@ :columns="buildingList"></u-picker> <u-picker :show="showModal3" keyName="name" @cancel="showModal3 = false" @confirm='confirm3' :columns="floorList"></u-picker> - <u-picker :show="showModal4" keyName="name" @cancel="showModal4 = false" @confirm='confirm4' + <u-picker :show="showModal4" keyName="roomNum" @cancel="showModal4 = false" @confirm='confirm4' :columns="roomList"></u-picker> <!-- --> - <u-datetime-picker :minDate="new Date().getTime()" :show="showTime" @confirm="confirmDate" + <u-datetime-picker :minDate="new Date().getTime()" :show="showTime" @confirm="confirmDate" @cancel="showTime = false" mode="datetime"></u-datetime-picker> + + <u-picker :show="showCate1" keyName="name" ref="uPicker" @change="changeHandler" @cancel="showCate1 = false" + @confirm='confirmCate1' :columns="cateList1"></u-picker> </view> </template> @@ -77,14 +91,18 @@ ywProjectPost, ywBuildingPost, ywFloorPost, - ywRoomPost, - ywWorkorderCreate + ywRoomPost, + ywWorkorderCreate, + getCategoryPost } from '@/api' import dayjs from 'dayjs'; export default { data() { return { - param: {}, + param: { + areaName: '瀹ゅ唴瑁呬慨', + areaType: 0 + }, showUpload: false, fileList: [], @@ -92,8 +110,10 @@ showModal1: false, showModal2: false, showModal3: false, - showModal4: false, + showModal4: false, showTime: false, + showCate1: false, + showCate2: false, areaType: [ [{ name: '瀹ゅ唴瑁呬慨', @@ -105,6 +125,8 @@ } ] ], + cateList1: [], + cateList2: [], projectList: [], buildingList: [], floorList: [], @@ -113,29 +135,59 @@ }, onLoad() { this.getProject() + this.getCate() }, - methods: { - onSubmit() { - const { param, fileList } = this - ywWorkorderCreate({ - ...param, - // roomId: '', - fileList - }).then(res => { - this.showToast('鎻愪氦鎴愬姛') - uni.redirectTo({ - url: '/pages/workOrder/list' - }) - }) + methods: { + onSubmit() { + const { + param, + fileList + } = this + ywWorkorderCreate({ + ...param, + // roomId: '', + fileList + }).then(res => { + this.showToast('鎻愪氦鎴愬姛') + uni.redirectTo({ + url: '/pages/workOrder/list' + }) + }) }, - confirm0(e) { + changeHandler(e) { + const { + columnIndex, + value, + values, // values涓哄綋鍓嶅彉鍖栧垪鐨勬暟缁勫唴瀹� + index, + // 寰俊灏忕▼搴忔棤娉曞皢picker瀹炰緥浼犲嚭鏉ワ紝鍙兘閫氳繃ref鎿嶄綔 + picker = this.$refs.uPicker + } = e + // 褰撶涓�鍒楀�煎彂鐢熷彉鍖栨椂锛屽彉鍖栫浜屽垪(鍚庝竴鍒�)瀵瑰簲鐨勯�夐」 + console.log(index); + console.log(index); + if (columnIndex === 0) { + // picker涓洪�夋嫨鍣╰his瀹炰緥锛屽彉鍖栫浜屽垪瀵瑰簲鐨勯�夐」 + picker.setColumnValues(1, this.cateList1[0][index].childCategoryList) + } + }, + confirmCate1(e) { + console.log(e.value[1]); + if(e.value.length == 2){ + this.$set(this.param, 'cateId', e.value[1].id) + this.$set(this.param, 'cateName', e.value[1].name) + this.showCate1 = false + } + + }, + confirm0(e) { const item = e.value[0] this.$set(this.param, 'areaType', item.id) this.$set(this.param, 'areaName', item.name) - this.showModal0 = false - this.param = { - areaType: item.id, - areaName: item.name, + this.showModal0 = false + this.param = { + areaType: item.id, + areaName: item.name, } }, confirm1(e) { @@ -151,29 +203,47 @@ this.showModal2 = false this.$set(this.param, 'buildingName', item.name) this.$set(this.param, 'buildingId', item.id) - if (this.areaType == 0) { - this.getRoom(item.id) + if (this.param.areaType == 0) { + this.getRoom(item.id) this.showModal4 = true } else { - this.getFloor(item.id) + this.getFloor(item.id) this.showModal3 = true } - }, - confirm3(e) { - const item = e.value[0] - this.showModal3 = false - this.$set(this.param, 'floorName', item.name) - this.$set(this.param, 'floorId', item.id) - }, - confirm4(e) { - const item = e.value[0] - this.showModal4 = false - this.$set(this.param, 'roomName', item.name) - this.$set(this.param, 'roomId', item.id) - }, - confirmDate(e) { - this.$set(this.param, 'getDate', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')); - this.showTime = false + }, + confirm3(e) { + const item = e.value[0] + this.showModal3 = false + this.$set(this.param, 'floorName', item.name) + this.$set(this.param, 'floorId', item.id) + }, + confirm4(e) { + const item = e.value[0] + this.showModal4 = false + this.$set(this.param, 'roomNum', item.roomNum) + this.$set(this.param, 'roomId', item.id) + }, + confirmDate(e) { + this.$set(this.param, 'getDate', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')); + this.showTime = false + }, + getCate() { + getCategoryPost({ + capacity: 9999, + page: 1, + model: { + type: 3 + } + }).then(res => { + + let temp = res.data.records || [] + if (temp && temp.length > 0) { + this.cateList1 = [temp, temp[0].childCategoryList || []] + } else { + this.cateList1 = [temp, []] + } + console.log(this.cateList1); + }) }, getProject() { ywProjectPost().then(res => { @@ -389,16 +459,17 @@ font-weight: 500; font-size: 32rpx; color: #FFFFFF; - } - .sel_upload_wrap { - width: 100%; - border-top: 1px solid #666666; - box-shadow: 0 1 1 #333333; - - .btn { - height: 90rpx; - line-height: 90rpx; - text-align: center; - } + } + + .sel_upload_wrap { + width: 100%; + border-top: 1px solid #666666; + box-shadow: 0 1 1 #333333; + + .btn { + height: 90rpx; + line-height: 90rpx; + text-align: center; + } } </style> \ No newline at end of file diff --git a/h5/pages/workOrder/list.vue b/h5/pages/workOrder/list.vue index 9189109..6336405 100644 --- a/h5/pages/workOrder/list.vue +++ b/h5/pages/workOrder/list.vue @@ -1,50 +1,58 @@ <template> <view class="main_app"> - <view class="head_wrap"> - <view class="search_wrap"> - <image class="mr12 search" src="@/static/home/ic_search@2x.png" mode="widthFix"></image> - <input v-model="param.roomName" @confirm="handleQuery" type="text" placeholder="鎼滅储妤煎畤/鎴块棿鍚嶇О" - placeholder-class="placeholder9" /> - </view> - </view> - <!-- --> - <view class="tabs"> - <view class="tab" :class="{active: activeTab == -1}" @click="tabsClick(-1)"> - <text>寰呭鐞�</text> - <text class="border"></text> - </view> - <view class="tab" :class="{active: activeTab == 2}" @click="tabsClick(2)"> - <text>宸插鐞�</text> - <text class="border"></text> - </view> - <view class="tab" @click="allClick"> - <view class="name"> - <image v-if="selectAll" class="icon" src="@/static/checked.png" mode=""></image> - <image v-else class="icon" src="@/static/check.png" mode=""></image> - <text>鏌ョ湅鍏ㄩ儴</text> + <div class="main_head"> + <view class="head_wrap"> + <view class="search_wrap"> + <image class="mr12 search" src="@/static/home/ic_search@2x.png" mode="widthFix"></image> + <input v-model="param.roomName" @confirm="handleQuery" type="text" placeholder="鎼滅储妤煎畤/鎴块棿鍚嶇О" + placeholder-class="placeholder9" /> </view> - <text class="border"></text> </view> - </view> - <!-- --> - <view class="list"> - <view class="item" v-for="item in list" @click="itemClick(item)"> - <image v-if="item.dealStatus == 0" src="@/static/side/workordered.png" class="icon"></image> - <image v-else src="@/static/side/workorder.png" class="icon"></image> - <view class="content"> - <view class="name_wrap line"> - <view class="name">{{item.buildingName}}/{{item.roomNum || item.floorName}}</view> - <view class="status gray" v-if="item.dealStatus == 2">宸插鐞�</view> - <view class="status" v-if="item.dealStatus == 0">寰呭鐞�</view> - <view class="status" v-if="item.dealStatus == 1">寰呭鐞�</view> + <!-- --> + <view class="tabs"> + <view class="tab" :class="{active: activeTab == '0,1'}" @click="tabsClick('0,1')"> + <text>寰呭鐞�</text> + <text class="border"></text> + </view> + <view class="tab" :class="{active: activeTab == 2}" @click="tabsClick(2)"> + <text>宸插鐞�</text> + <text class="border"></text> + </view> + <view class="tab" @click="allClick"> + <view class="name"> + <image v-if="selectAll" class="icon" src="@/static/checked.png" mode=""></image> + <image v-else class="icon" src="@/static/check.png" mode=""></image> + <text>鏌ョ湅鍏ㄩ儴</text> </view> - <view class="line">浣嶇疆绫诲瀷锛歿{item.areaType == '0' ? '瀹ゅ唴瑁呬慨' : '鍏叡鍖哄煙'}}</view> - <view class="line">宸ュ崟鍒嗙被锛歿{item.categoryName}}</view> - <view class="line">涓婃姤鏃堕棿锛歿{item.createDate}}</view> - <view class="line">涓婇棬鏃堕棿锛歿{item.getDate}}</view> + <text class="border"></text> </view> </view> - </view> + </div> + <!-- --> + <scroll-view scroll-y="true" class="scroll_Y" @scrolltolower="scrolltolower"> + <view class="list"> + <view class="item" v-for="item in list" @click="itemClick(item)"> + <image v-if="item.dealStatus == 0" src="@/static/side/workordered.png" class="icon"></image> + <image v-else src="@/static/side/workorder.png" class="icon"></image> + <view class="content"> + <view class="name_wrap line"> + <view class="name">{{item.buildingName}}/{{item.roomNum || item.floorName}}</view> + <view class="status gray" v-if="item.dealStatus == 2">宸插鐞�</view> + <view class="status" v-if="item.dealStatus == 0">寰呭鐞�</view> + <view class="status" v-if="item.dealStatus == 1">寰呭鐞�</view> + </view> + <view class="line">浣嶇疆绫诲瀷锛歿{item.areaType == '0' ? '瀹ゅ唴瑁呬慨' : '鍏叡鍖哄煙'}}</view> + <view class="line">宸ュ崟鍒嗙被锛歿{item.categoryName}}</view> + <view class="line">涓婃姤鏃堕棿锛歿{item.createDate}}</view> + <view class="line">涓婇棬鏃堕棿锛歿{item.getDate}}</view> + </view> + </view> + <view v-if="list.length == 0" class="empty_wrap"> + <image src="@/static/empty.png" mode=""></image> + <view class="">鏆傛棤鏁版嵁</view> + </view> + </view> + </scroll-view> <!-- --> </view> </template> @@ -57,7 +65,7 @@ data() { return { param: {}, - activeTab: -1, + activeTab: '0,1', selectAll: false, list: [], @@ -68,21 +76,24 @@ onShow() { this.getList() }, - onReachBottom() { - const {total,list} = this - if (list.length < total) { - this.page = this.page + 1 - this.getList() - } else { - this.showToast('鏆傛棤鏇村鏁版嵁') - } - }, - methods: { + methods: { + scrolltolower() { + const { + total, + list + } = this + if (list.length < total) { + this.page = this.page + 1 + this.getList() + } else { + this.showToast('鏆傛棤鏇村鏁版嵁') + } + }, tabsClick(val) { this.activeTab = val this.list = [] this.page = 1 - this, getList() + this.getList() }, allClick() { this.selectAll = !this.selectAll @@ -94,11 +105,11 @@ uni.navigateTo({ url: `/pages/workOrder/detail?id=${item.id}` }) - }, - handleQuery() { - this.list = [] - this.page = 1 - this.getList() + }, + handleQuery() { + this.list = [] + this.page = 1 + this.getList() }, getList() { const { @@ -106,14 +117,15 @@ total, list, activeTab, - param, + param, selectAll } = this ywWorkorder({ page, capacity: 10, model: { - ...param, + ...param, + queryStatus: activeTab, dispatchUserId: selectAll ? '' : uni.getStorageSync('userInfo').id, } }).then(res => { @@ -203,7 +215,9 @@ } } - + .scroll_Y{ + height: calc(100vh - 320rpx); + } .list { .item { display: flex; -- Gitblit v1.9.3