From cd2d3c65b9af62cbafa57a835b237a9f193148f2 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 20 九月 2024 14:22:06 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
admin/src/views/platform/platform.vue | 58 +++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 39 insertions(+), 19 deletions(-)
diff --git a/admin/src/views/platform/platform.vue b/admin/src/views/platform/platform.vue
index fa1324a..8ae1b2c 100644
--- a/admin/src/views/platform/platform.vue
+++ b/admin/src/views/platform/platform.vue
@@ -4,7 +4,17 @@
<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" placeholder="璇疯緭鍏ユ湀鍙板悕绉�" @keypress.enter.native="search"></el-input>
+ <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>
<el-button type="primary" @click="search">鎼滅储</el-button>
@@ -16,7 +26,7 @@
<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="working1" @click="syncStatus" icon="el-icon-plus" v-permissions="['business:hksync:platforms']">鍚屾瀹炴椂鐘舵��</el-button></li>
</ul>
<el-table
v-loading="isWorking.search"
@@ -27,8 +37,20 @@
<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="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>
+ </template>
+ </el-table-column>
<el-table-column prop="stayTmeoutAlarmTime" label="鍋滅暀瓒呮椂鎶ヨ鏃堕棿(鍒嗛挓锛�" min-width="180px">
<template scope="{row}">{{row.stayTmeoutAlarmTime?(row.stayTmeoutAlarmTime):'-'}}</template>
</el-table-column>
@@ -36,18 +58,6 @@
<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 label="鏄惁鍥尯鍏ュ彛">
- <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>
- </template>
- </el-table-column>
<el-table-column prop="platformStatus" label="鏈堝彴鐘舵��" min-width="100px">
<template scope="{row}">
<span v-if="row.platformStatus == 0">鏃犺溅</span>
@@ -58,7 +68,7 @@
</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 prop="hkDate" label="鍚屾鏃堕棿" min-width="150px"></el-table-column>
<el-table-column
v-if="containPermissions(['business:platform:update', 'business:platform:delete'])"
label="鎿嶄綔"
@@ -89,17 +99,20 @@
import SearchFormCollapse from '@/components/common/SearchFormCollapse'
import Pagination from '@/components/common/Pagination'
import OperaPlatformWindow from '@/components/business/OperaPlatformWindow'
+import { allList } from '@/api/platform/platformGroup'
export default {
name: 'Platform',
extends: BaseTable,
components: { SearchFormCollapse, TableLayout, Pagination, OperaPlatformWindow },
data () {
return {
+ groupList: [],
// 鎼滅储
working: false,
working1: false,
searchForm: {
- name: ''
+ name: '',
+ groupId: null
}
}
},
@@ -111,8 +124,15 @@
'field.main': 'id'
})
this.search()
+ this.loadGroupList()
},
methods: {
+ loadGroupList () {
+ allList({})
+ .then(res => {
+ this.groupList = res || []
+ })
+ },
changeStatus (e, row) {
this.api.updateStatusById({
id: row.id,
@@ -129,7 +149,7 @@
this.search()
})
.catch(e => {
- this.$tip.apiFailed(e)
+ // this.$tip.apiFailed(e)
})
.finally(() => {
this.isWorking.working = false
@@ -147,7 +167,7 @@
this.search()
})
.catch(e => {
- this.$tip.apiFailed(e)
+ // this.$tip.apiFailed(e)
})
.finally(() => {
this.isWorking.working = false
--
Gitblit v1.9.3