From d492850f1cc64ddcfaf43798af9c76c2505414fd Mon Sep 17 00:00:00 2001 From: renkang <8417338+k94314517@user.noreply.gitee.com> Date: 星期五, 24 一月 2025 18:24:31 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/2.0.1' into 2.0.1 --- admin/src/views/operation/components/deviceDetail.vue | 281 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 273 insertions(+), 8 deletions(-) diff --git a/admin/src/views/operation/components/deviceDetail.vue b/admin/src/views/operation/components/deviceDetail.vue index f3181aa..02633b3 100644 --- a/admin/src/views/operation/components/deviceDetail.vue +++ b/admin/src/views/operation/components/deviceDetail.vue @@ -1,7 +1,14 @@ <template> - <GlobalWindow width="720px" title="璁惧璇︽儏" :visible.sync="visible" :confirm-working="isWorking" @close="close" + <GlobalWindow width="100%" title="璁惧璇︽儏" :withFooter="false" :visible.sync="visible" :confirm-working="isWorking" @close="close" @confirm="confirm"> - <div class="main"> + <div style="width: 100%; position: sticky; top: 0; left: 0; z-index: 999; background: #ffffff;"> + <div class="tabs"> + <div class="tab" :class="{ active: activeTabs === 0 }" @click="tabsClick(0)">璁惧淇℃伅</div> + <div class="tab" :class="{ active: activeTabs === 1 }" @click="tabsClick(1)">杩愮淮璁板綍</div> + <div class="tab" :class="{ active: activeTabs === 2 }" @click="tabsClick(2)">宸℃璁板綍</div> + </div> + </div> + <div class="main" v-if="activeTabs === 0"> <div class="title"> <span>鍩虹淇℃伅</span> </div> @@ -32,6 +39,18 @@ <div class="val">{{ info.addr }}</div> </div> <div class="item"> + <div class="la">鎵�灞為」鐩�</div> + <div class="val">{{ info.projectName }}</div> + </div> + <div class="item"> + <div class="la">鍏宠仈鎴挎簮</div> + <div class="val">{{ info.buildingName }} / {{ info.floorName }} / {{info.roomName}}</div> + </div> + <div class="item"> + <div class="la">璐叆鏃堕棿</div> + <div class="val">{{ info.buyDate }}</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> @@ -48,24 +67,189 @@ <div v-if="info.fileFullUrl" class="item" style="width: 100%;"> <div class="la">鐓х墖</div> <div class="val"> - <img class="photo" :src="info.fileFullUrl" alt=""> + <el-image + style="width: 100px; height: 100px" + :src="info.fileFullUrl" + :preview-src-list="[info.fileFullUrl]"> + </el-image> + </div> + </div> + <div class="item" style="width: 100%;"> + <div class="la">闄勪欢</div> + <div class="val"> + <el-table + :data="info.multifileList ? info.multifileList : []" + border + style="width: 100%"> + <el-table-column + prop="name" + label="闄勪欢鍚嶇О"> + </el-table-column> + <el-table-column + prop="userName" + label="鎿嶄綔浜�"> + </el-table-column> + <el-table-column + prop="createDate" + label="鎿嶄綔鏃堕棿"> + </el-table-column> + </el-table> </div> </div> </div> </div> + <div class="title"> + <span>渚涘簲鍟嗕俊鎭�</span> + </div> + <div class="main_content"> + <div class="list"> + <div class="item"> + <div class="la">渚涘簲鍟�</div> + <div class="val">{{info.supplier}}</div> + </div> + <div class="item"> + <div class="la">鑱旂郴浜�</div> + <div class="val">{{info.supplierLinker}}</div> + </div> + <div class="item"> + <div class="la">鑱旂郴鏂瑰紡</div> + <div class="val">{{info.supplierPhone}}</div> + </div> + </div> + </div> + <div class="title"> + <span>缁翠繚淇℃伅</span> + </div> + <div class="main_content"> + <div class="list"> + <div class="item"> + <div class="la">缁翠繚璐熻矗浜�</div> + <div class="val">{{info.maintenanceUserName}}</div> + </div> + <div class="item"> + <div class="la">缁翠繚鍒版湡鏃�</div> + <div class="val">{{info.maintenanceOverDate}}</div> + </div> + <div class="item" style="width: 100%;"> + <div class="la">缁翠繚璇存槑</div> + <div class="val">{{info.maintenanceContent}}</div> + </div> + </div> + </div> </div> + <div class="main" v-if="activeTabs === 1"> + <el-table + :data="infoList" + border + style="width: 100%"> + <el-table-column + prop="realName" + label="杩愮淮浜哄憳"> + </el-table-column> + <el-table-column + label="璁惧鐘舵��"> + <template slot-scope="{row}"> + <span v-if="row.status === 0">姝e父</span> + <span v-if="row.status === 1">鎹熷潖</span> + <span v-if="row.status === 2">鎶ュ簾</span> + </template> + </el-table-column> + <el-table-column + prop="remark" + label="杩愮淮澶囨敞"> + </el-table-column> + <el-table-column + prop="dealDate" + label="杩愮淮鏃堕棿"> + </el-table-column> + <el-table-column + label="鎿嶄綔"> + <template slot-scope="{row}"> + <el-button type="text" @click="handleDetail(row)">鏌ョ湅璇︽儏</el-button> + </template> + </el-table-column> + </el-table> + <el-pagination + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + :current-page="page" + :page-sizes="[10, 20, 30, 40]" + :page-size="pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="total"> + </el-pagination> + </div> + <div class="main" v-if="activeTabs === 2"> + <el-table + :data="infoList" + border + style="width: 100%"> + <el-table-column + prop="schemeTitle" + label="璁″垝鍚嶇О"> + </el-table-column> + <el-table-column + prop="taskCode" + label="浠诲姟缂栧彿"> + </el-table-column> + <el-table-column + label="浠诲姟鏃堕棿"> + <template slot-scope="{row}"> + {{row.startDate}} ~ {{row.endDate}} + </template> + </el-table-column> + <el-table-column + prop="realname" + label="宸℃浜�"> + </el-table-column> + <el-table-column + label="宸℃缁撴灉"> + <template slot-scope="{row}"> + <span v-if="row.dealStatus === 0">姝e父</span> + <span v-if="row.dealStatus === 1">寮傚父</span> + </template> + </el-table-column> + <el-table-column + label="宸℃闄勪欢"> + <template slot-scope="{row}"> + <el-image + v-if="row.multifileList && row.multifileList.length > 0" + style="width: 100px; height: 100px" + :src="row.multifileList[0].fileurlFull" + :preview-src-list="[row.multifileList[0].fileurlFull]"> + </el-image> + </template> + </el-table-column> + <el-table-column + prop="content" + label="宸℃璇存槑"> + </el-table-column> + </el-table> + <el-pagination + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + :current-page="page" + :page-sizes="[10, 20, 30, 40]" + :page-size="pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="total"> + </el-pagination> + </div> + <Detail ref="DetailRef" /> </GlobalWindow> </template> <script> import GlobalWindow from '@/components/common/GlobalWindow' import BaseOpera from '@/components/base/BaseOpera' +import Detail from './maintainDetail' import { detailById } from '@/api/Inspection/device.js' -import { getUserList } from '@/api/system/user' -import { Message, Loading } from 'element-ui' +import { fetchList } from '@/api/Inspection/deviceRecord.js' +import { getDetail } from '@/api/Inspection/ywPatrolTask.js' export default { components: { - GlobalWindow + GlobalWindow, + Detail }, extends: BaseOpera, data() { @@ -73,19 +257,83 @@ id: '', visible: false, info: {}, - + activeTabs: 0, + fileList: [], + + infoList: [], + total: 0, + pageSize: 10, + page: 1 } }, methods: { + handleSizeChange(e) { + this.pageSize = e + if (this.activeTabs === 1) { + this.getyunwei() + } else if (this.activeTabs === 2) { + this.getXunJian() + } + }, + handleCurrentChange(e) { + this.page = e + if (this.activeTabs === 1) { + this.getyunwei() + } else if (this.activeTabs === 2) { + this.getXunJian() + } + }, getDetail() { + this.this.activeTabs = 0 const { id } = this detailById(id).then(res => { this.info = res }) }, + handleDetail(row) { + this.$refs.DetailRef.visible = true + this.$refs.DetailRef.getDetail(row.id) + }, close() { this.visible = false this.$emit('close') + }, + tabsClick(val) { + this.activeTabs = val + this.pageSize = 10 + this.page = 1 + this.infoList = [] + if (val === 1) { + this.getyunwei() + } else if (val === 2) { + this.getXunJian() + } + }, + // 鑾峰彇璁惧杩愮淮璁板綍 + getyunwei() { + fetchList({ + capacity: this.pageSize, + page: this.page, + model: { + deviceId: this.id + } + }).then(res => { + this.infoList = res.records + this.total = res.total + }) + }, + // 宸℃璁板綍 + getXunJian() { + getDetail({ + capacity: this.pageSize, + page: this.page, + model: { + deviceId: this.id + } + }).then(res => { + this.infoList = res.records + this.total = res.total + }) } } } @@ -93,7 +341,24 @@ <style lang="scss" scoped> @import '@/assets/style/variables.scss'; - +.tabs { + border-bottom: 1px solid #DFE2E8; + display: flex; + .tab { + height: 58px; + line-height: 58px; + font-size: 16px; + color: #666666; + margin-right: 30px; + cursor: pointer; + } + + .active { + font-weight: 500; + color: $primary-color; + border-bottom: 2px solid $primary-color; + } +} .main { padding-top: 20px; -- Gitblit v1.9.3