From 6692800851e643f2a58decb9d77ee27f133684b3 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 29 九月 2025 18:03:38 +0800
Subject: [PATCH] 最新版本541200007
---
admin/src/views/platform/platform.vue | 143 +++++++++++++++++++++++++----------------------
1 files changed, 75 insertions(+), 68 deletions(-)
diff --git a/admin/src/views/platform/platform.vue b/admin/src/views/platform/platform.vue
index 1632694..3446e39 100644
--- a/admin/src/views/platform/platform.vue
+++ b/admin/src/views/platform/platform.vue
@@ -1,96 +1,97 @@
<template>
<TableLayout :permissions="['business:platform:query']">
<!-- 鎼滅储琛ㄥ崟 -->
- <SearchFormCollapse slot="search-form" :need-more="false">
- <el-form ref="searchForm" :model="searchForm" label-width="100px" inline>
- <el-form-item label="" prop="name">
- <el-input v-model="searchForm.name" clearable placeholder="璇疯緭鍏ユ湀鍙板悕绉�" @keypress.enter.native="search"></el-input>
- </el-form-item>
- <el-form-item label="" >
- <el-select v-model="searchForm.groupId" placeholder="璇烽�夋嫨鏈堝彴鍒嗙粍" @change="search" clearable>
- <el-option
- v-for="item in groupList"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <section>
+ <div ref="QueryFormRef" slot="search-form">
+ <SearchFormCollapse :need-more="false">
+ <el-form ref="searchForm" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="" prop="name">
+ <el-input v-model="searchForm.name" clearable placeholder="璇疯緭鍏ユ湀鍙板悕绉�"
+ @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <el-form-item label="" prop="groupId">
+ <el-select v-model="searchForm.groupId" placeholder="璇烽�夋嫨鏈堝彴鍒嗙粍" @change="search" clearable>
+ <el-option v-for="item in groupList" :key="item.id" :label="item.name" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="" prop="type">
+ <el-select v-model="searchForm.type" placeholder="璇烽�夋嫨鏈堝彴绫诲瀷" @change="search" clearable>
+ <el-option label="鏁存墭鐩�" :value="0"></el-option>
+ <el-option label="鏁d欢" :value="1"></el-option>
+ </el-select>
+ </el-form-item>
+ <!-- <section> -->
<el-button type="primary" @click="search">鎼滅储</el-button>
<el-button @click="reset">閲嶇疆</el-button>
- </section>
- </el-form>
- </SearchFormCollapse>
+ <!-- </section> -->
+ </el-form>
+ </SearchFormCollapse>
+ </div>
<!-- 琛ㄦ牸鍜屽垎椤� -->
<template v-slot:table-wrap>
<ul class="toolbar" v-permissions="['business:hksync:platforms']">
- <li><el-button type="primary" :loading="working" @click="syncData" icon="el-icon-plus" v-permissions="['business:hksync:platforms']">鍚屾</el-button></li>
- <li><el-button type="primary" :loading="working1" @click="syncStatus" icon="el-icon-plus" v-permissions="['business:hksync:platforms']">鍚屾瀹炴椂鐘舵��</el-button></li>
+ <li><el-button type="primary" :loading="working" @click="syncData" icon="el-icon-plus"
+ v-permissions="['business:hksync:platforms']">鍚屾</el-button></li>
+ <li><el-button type="primary" :loading="working1" @click="syncStatus" icon="el-icon-plus"
+ v-permissions="['business:hksync:platforms']">鍚屾瀹炴椂鐘舵��</el-button></li>
</ul>
<el-table
- v-loading="isWorking.search"
- :data="tableData.list"
- stripe
- @selection-change="handleSelectionChange"
- >
+ :height="tableHeightNew" 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="name" label="鏈堝彴鍚嶇О" fixed min-width="100px"></el-table-column>
<el-table-column prop="code" label="鏈堝彴缂栫爜" fixed min-width="100px"></el-table-column>
- <el-table-column prop="groupName" label="鎵�灞炴湀鍙扮粍" fixed min-width="150px"></el-table-column>
- <el-table-column prop="workingNum" label="鍚屾椂鍙彿杞﹁締鏁�" min-width="120px"></el-table-column>
- <el-table-column label="绂�/鍚敤" min-width="120px">
- <template slot-scope="{row}">
- <el-switch
- @change="changeStatus($event, row)"
- v-model="row.status"
- active-color="#13ce66"
- inactive-color="#ff4949"
- :active-value="0"
- :inactive-value="1">
- </el-switch>
+ <el-table-column prop="type" label="鏈堝彴绫诲瀷" min-width="100px">
+ <template scope="{row}">
+ <span v-if="row.type == 0" class="green">鏁存墭鐩�</span>
+ <span v-else-if="row.type == 1" class="red">鏁d欢</span>
+ <span v-else class="grey">-</span>
</template>
</el-table-column>
- <el-table-column prop="stayTmeoutAlarmTime" label="鍋滅暀瓒呮椂鎶ヨ鏃堕棿(鍒嗛挓锛�" min-width="180px">
- <template scope="{row}">{{row.stayTmeoutAlarmTime?(row.stayTmeoutAlarmTime):'-'}}</template>
+ <el-table-column prop="groupName" label="鎵�灞炴湀鍙扮粍" fixed min-width="150px"></el-table-column>
+ <el-table-column prop="sortnum" label="鎺掑簭鐮�" min-width="90px"></el-table-column>
+ <el-table-column prop="workingNum" label="鍚屾椂鍙彿鏁伴噺" min-width="120px"></el-table-column>
+ <el-table-column prop="callReadyNum" label="鍚屾椂鍑嗗鏁伴噺" min-width="120px"></el-table-column>
+ <el-table-column prop="stayTimeoutAlarmTime" label="鍋滅暀瓒呮椂鎶ヨ鏃堕棿(鍒嗛挓锛�" min-width="180px">
+ <template scope="{row}">{{ row.stayTimeoutAlarmTime ? (row.stayTimeoutAlarmTime) : '-' }}</template>
</el-table-column>
<el-table-column prop="workTimeoutAlarmTime" label="浣滀笟瓒呮椂鎶ヨ鏃堕棿(鍒嗛挓锛�" min-width="180px">
- <template scope="{row}"> {{row.workTimeoutAlarmTime?(row.workTimeoutAlarmTime):'-'}}</template>
+ <template scope="{row}"> {{ row.workTimeoutAlarmTime ? (row.workTimeoutAlarmTime) : '-' }}</template>
</el-table-column>
- <el-table-column prop="workRate" label="鏈堝彴浣滀笟鏁堢巼(涓囧彧/灏忔椂)" min-width="180px"></el-table-column>
- <el-table-column prop="platformStatus" label="鏈堝彴鐘舵��" min-width="100px">
+ <el-table-column prop="workRate" label="鏈堝彴浣滀笟鏁堢巼(涓囨敮/灏忔椂)" min-width="180px"></el-table-column>
+ <!-- <el-table-column prop="platformStatus" label="鏈堝彴鐘舵��" min-width="100px">
<template scope="{row}">
<span v-if="row.platformStatus == 0">鏃犺溅</span>
<span v-if="row.platformStatus == 1">鏈夎溅</span>
<span v-if="row.platformStatus == 2">瓒呮椂鍋滈潬</span>
<span v-if="row.platformStatus == 3">閿欒鍋滈潬</span>
</template>
- </el-table-column>
-
+ </el-table-column> -->
<el-table-column prop="broadcastNames" label="鍏宠仈骞挎挱" min-width="100px"></el-table-column>
<el-table-column prop="ledNames" label="鍏宠仈LED" min-width="100px"></el-table-column>
- <el-table-column prop="hkDate" label="鍚屾鏃堕棿" min-width="140px"></el-table-column>
- <el-table-column
- v-if="containPermissions(['business:platform:update', 'business:platform:delete'])"
- label="鎿嶄綔"
- min-width="120"
- fixed="right"
- >
+ <el-table-column prop="ledContent" label="LED绌洪棽鏂囨" min-width="180px"></el-table-column>
+ <el-table-column prop="hkDate" label="鍚屾鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column label="鏈堝彴鐘舵��" fixed="right" width="100px">
<template slot-scope="{row}">
- <el-button type="text" @click="$refs.operaPlatformWindow.open('缂栬緫鏈堝彴淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:platform:update']">缂栬緫</el-button>
- <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:platform:delete']">鍒犻櫎</el-button>
+ <el-switch @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66"
+ inactive-color="#ff4949" :active-value="0" :inactive-value="1">
+ </el-switch>
+ </template>
+ </el-table-column>
+ <el-table-column v-if="containPermissions(['business:platform:update', 'business:platform:delete'])" label="鎿嶄綔"
+ min-width="120" fixed="right">
+ <template slot-scope="{row}">
+ <el-button type="text" @click="$refs.operaPlatformWindow.open('缂栬緫鏈堝彴淇℃伅琛�', row)" icon="el-icon-edit"
+ v-permissions="['business:platform:update']">缂栬緫</el-button>
+ <!-- <el-button type="text" @click="deleteById(row)" icon="el-icon-delete"
+ v-permissions="['business:platform: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>
<!-- 鏂板缓/淇敼 -->
- <OperaPlatformWindow ref="operaPlatformWindow" @success="handlePageChange"/>
+ <OperaPlatformWindow ref="operaPlatformWindow" @success="handlePageChange" />
</TableLayout>
</template>
@@ -105,7 +106,7 @@
name: 'Platform',
extends: BaseTable,
components: { SearchFormCollapse, TableLayout, Pagination, OperaPlatformWindow },
- data () {
+ data() {
return {
groupList: [],
// 鎼滅储
@@ -113,11 +114,12 @@
working1: false,
searchForm: {
name: '',
+ type:null,
groupId: null
}
}
},
- created () {
+ created() {
this.config({
module: '鏈堝彴淇℃伅琛�',
api: '/platform/platform',
@@ -127,20 +129,25 @@
this.search()
this.loadGroupList()
},
+ mounted() {
+ this.$nextTick(() => {
+ this.tableHeight = document.body.scrollHeight - this.$refs.QueryFormRef.offsetHeight - 300
+ })
+ },
methods: {
- loadGroupList () {
+ loadGroupList() {
allList({})
.then(res => {
this.groupList = res || []
})
},
- changeStatus (e, row) {
+ changeStatus(e, row) {
this.api.updateStatusById({
id: row.id,
status: e
})
},
- syncData () {
+ syncData() {
this.$dialog.actionConfirm('鎿嶄綔纭鎻愰啋', '鎮ㄧ‘璁ゅ悓姝ュ叏閮ㄤ俊鎭悧锛�')
.then(() => {
this.isWorking.working = true
@@ -156,9 +163,9 @@
this.isWorking.working = false
})
})
- .catch(() => {})
+ .catch(() => { })
},
- syncStatus () {
+ syncStatus() {
this.$dialog.actionConfirm('鎿嶄綔纭鎻愰啋', '鎮ㄧ‘璁ゅ悓姝ュ叏閮ㄤ俊鎭悧锛�')
.then(() => {
this.isWorking.working = true
@@ -174,7 +181,7 @@
this.isWorking.working = false
})
})
- .catch(() => {})
+ .catch(() => { })
}
}
}
--
Gitblit v1.9.3