From b524dc50dedb0e6d8ae0a432ae2d436829da9319 Mon Sep 17 00:00:00 2001
From: gaosp <gaosp>
Date: 星期六, 13 一月 2024 11:35:45 +0800
Subject: [PATCH] update

---
 src/container/maintenance/index.vue     |  210 +++++++++++----
 src/store/modules/user.js               |    1 
 src/container/ledger/index.vue          |   14 
 src/container/component/index.vue       |   99 ++++---
 src/container/deviceType/index.vue      |  118 ++++---
 src/container/maintenance/dailyMAdd.vue |  343 ++++++++++++++++++++++++
 src/router/index.js                     |    2 
 7 files changed, 632 insertions(+), 155 deletions(-)

diff --git a/src/container/component/index.vue b/src/container/component/index.vue
index 2b7d707..4106a04 100644
--- a/src/container/component/index.vue
+++ b/src/container/component/index.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2024-01-06 17:40:19
  * @LastEditors: Sneed
- * @LastEditTime: 2024-01-13 11:16:53
+ * @LastEditTime: 2024-01-13 11:34:15
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/component/index.vue
 -->
 <template>
@@ -56,10 +56,10 @@
                     </el-date-picker>
                 </div>
                 <div class="item">
-                    <div class="query btn" @click="query">鏌ヨ</div>
+                    <el-button type="primary" size="small" @click="query">鏌ヨ</el-button>
                 </div>
                 <div class="item">
-                    <div class="reset btn" @click="reset">閲嶇疆</div>
+                    <el-button type="primary" size="small" @click="reset">閲嶇疆</el-button>
                 </div>
             </template>
             <template slot="columns">
@@ -143,51 +143,64 @@
             border: 1px solid #435F9E;
         }
     }
+    .el-button--mini {
+        background: transparent;
+    }
+    .el-button--primary {
+        background-color: transparent;
+    }
 }
 </style>
 <style lang="scss" scoped>
-    .maintenance {
-        width: 100%;
-        height: 100%;
-        overflow: hidden;
-        color: #FFF;
+.maintenance {
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+    color: #FFF;
+    display: flex;
+    flex-direction: column;
+
+    .nav {
+        padding: 10px 30px;
+    }
+
+    .item {
+        margin-top: 20px;
+        margin-left: 50px;
         display: flex;
-        flex-direction: column;
-        .nav {
-            padding: 10px 30px;
+        align-items: center;
+
+        span {
+            width: 120px;
+            font-size: 16px;
+            font-family: PingFangSC, PingFang SC;
+            color: #C6DCE0;
+            text-align: right;
+            padding-right: 20px;
         }
-        .item {
-            margin-top: 20px;
-            margin-left: 50px;
-            display: flex;
-            align-items: center;
-            span {
-                width: 120px;
-                font-size: 16px;
-                font-family: PingFangSC, PingFang SC;
-                color: #C6DCE0;
-                text-align: right;
-                padding-right: 20px;
-            }
-            .item-value {
-                width: 200px;
-                border: 1px solid #435F9E;
-            }
-            .btn {
-                line-height: 1.5;
-                width: 100px;
-                text-align: center;
-                font-size: 16px;
-                cursor: pointer;
-            }
-            .reset {
-                background: #AAB6BA;
-                color: #FFF;
-            }
-            .query {
-                background: #5DD1FC;
-                color: #FFF;
-            }
+
+        .item-value {
+            width: 200px;
+            border: 1px solid #435F9E;
+        }
+
+        .btn {
+            line-height: 1.5;
+            width: 100px;
+            text-align: center;
+            font-size: 16px;
+            cursor: pointer;
+        }
+
+        .reset {
+            background: #AAB6BA;
+            color: #FFF;
+        }
+
+        .query {
+            background: #5DD1FC;
+            color: #FFF;
         }
     }
+}
 </style>
\ No newline at end of file
diff --git a/src/container/deviceType/index.vue b/src/container/deviceType/index.vue
index 5800299..aa9bc41 100644
--- a/src/container/deviceType/index.vue
+++ b/src/container/deviceType/index.vue
@@ -1,22 +1,22 @@
 <!--
  * @Date: 2024-01-06 17:40:19
  * @LastEditors: Sneed
- * @LastEditTime: 2024-01-12 22:44:37
+ * @LastEditTime: 2024-01-13 11:35:29
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/deviceType/index.vue
 -->
 <template>
     <div class="maintenance">
-        <div class="nav">璁惧淇濆吇/鏃ュ父淇濆吇</div>
-        <List ref="list" url="/component/pageQuery">
+        <div class="nav">宸ヤ欢淇℃伅</div>
+        <List ref="list" :url="url">
             <template slot="search">
                 <div class="item">
                     <span>闆朵欢鍙�</span>
                     <el-select class="item-value" v-model="queryInfo.component" placeholder="璇烽�夋嫨">
                         <el-option
                         v-for="item in componentList"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value">
+                        :key="item"
+                        :label="item"
+                        :value="item">
                         </el-option>
                     </el-select>
                 </div>
@@ -26,9 +26,9 @@
                     <el-select class="item-value" v-model="queryInfo.precess" placeholder="璇烽�夋嫨">
                         <el-option
                         v-for="item in precessList"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value">
+                        :key="item"
+                        :label="item"
+                        :value="item">
                         </el-option>
                     </el-select>
                 </div>
@@ -56,10 +56,10 @@
                     </el-date-picker>
                 </div>
                 <div class="item">
-                    <div class="query btn" @click="query">鏌ヨ</div>
+                    <el-button type="primary" size="small" @click="query">鏌ヨ</el-button>
                 </div>
                 <div class="item">
-                    <div class="reset btn" @click="reset">閲嶇疆</div>
+                    <el-button type="primary" size="small" @click="reset">閲嶇疆</el-button>
                 </div>
             </template>
             <template slot="columns">
@@ -87,12 +87,14 @@
 </template>
 <script>
     import List from '../list/index.vue'
+    import { getUrl } from '@/api/Api'
     export default {
         components: {
             List
         },
         data () {
             return {
+                url: '',
                 queryInfo: {
                     timeBegin: '',
                     timeEnd: '',
@@ -104,6 +106,7 @@
             }
         },
         created () {
+            this.url = getUrl('componentQuery')
             this.init()
             // this.getProtocolList()
         },
@@ -140,51 +143,64 @@
             border: 1px solid #435F9E;
         }
     }
+    .el-button--mini {
+        background: transparent;
+    }
+    .el-button--primary {
+        background-color: transparent;
+    }
 }
 </style>
 <style lang="scss" scoped>
-    .maintenance {
-        width: 100%;
-        height: 100%;
-        overflow: hidden;
-        color: #FFF;
+.maintenance {
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+    color: #FFF;
+    display: flex;
+    flex-direction: column;
+
+    .nav {
+        padding: 10px 30px;
+    }
+
+    .item {
+        margin-top: 20px;
+        margin-left: 50px;
         display: flex;
-        flex-direction: column;
-        .nav {
-            padding: 10px 30px;
+        align-items: center;
+
+        span {
+            width: 120px;
+            font-size: 16px;
+            font-family: PingFangSC, PingFang SC;
+            color: #C6DCE0;
+            text-align: right;
+            padding-right: 20px;
         }
-        .item {
-            margin-top: 20px;
-            margin-left: 50px;
-            display: flex;
-            align-items: center;
-            span {
-                width: 120px;
-                font-size: 16px;
-                font-family: PingFangSC, PingFang SC;
-                color: #C6DCE0;
-                text-align: right;
-                padding-right: 20px;
-            }
-            .item-value {
-                width: 200px;
-                border: 1px solid #435F9E;
-            }
-            .btn {
-                line-height: 1.5;
-                width: 100px;
-                text-align: center;
-                font-size: 16px;
-                cursor: pointer;
-            }
-            .reset {
-                background: #AAB6BA;
-                color: #FFF;
-            }
-            .query {
-                background: #5DD1FC;
-                color: #FFF;
-            }
+
+        .item-value {
+            width: 200px;
+            border: 1px solid #435F9E;
+        }
+
+        .btn {
+            line-height: 1.5;
+            width: 100px;
+            text-align: center;
+            font-size: 16px;
+            cursor: pointer;
+        }
+
+        .reset {
+            background: #AAB6BA;
+            color: #FFF;
+        }
+
+        .query {
+            background: #5DD1FC;
+            color: #FFF;
         }
     }
+}
 </style>
\ No newline at end of file
diff --git a/src/container/ledger/index.vue b/src/container/ledger/index.vue
index e222a74..45a3577 100644
--- a/src/container/ledger/index.vue
+++ b/src/container/ledger/index.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2024-01-06 17:40:19
  * @LastEditors: Sneed
- * @LastEditTime: 2024-01-13 11:09:50
+ * @LastEditTime: 2024-01-13 11:33:09
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/ledger/index.vue
 -->
 <template>
@@ -60,10 +60,12 @@
                     <el-input class="item-value" v-model="queryInfo.manufacturer"></el-input>
                 </div>
                 <div class="item">
-                    <div class="query btn" @click="query">鏌ヨ</div>
+                    <el-button type="primary" size="small" @click="query">鏌ヨ</el-button>
+                    <!-- <div class="query btn" @click="query">鏌ヨ</div> -->
                 </div>
                 <div class="item">
-                    <div class="reset btn"  @click="reset">閲嶇疆</div>
+                    <el-button type="primary" size="small" @click="reset">閲嶇疆</el-button>
+                    <!-- <div class="reset btn"  @click="reset">閲嶇疆</div> -->
                 </div>
             </template>
 
@@ -248,6 +250,12 @@
             border: 1px solid #435F9E;
         }
     }
+    .el-button--mini {
+        background: transparent;
+    }
+    .el-button--primary {
+        background-color: transparent;
+    }
 }
 </style>
 <style lang="scss" scoped>
diff --git a/src/container/maintenance/dailyMAdd.vue b/src/container/maintenance/dailyMAdd.vue
new file mode 100644
index 0000000..f5d5a95
--- /dev/null
+++ b/src/container/maintenance/dailyMAdd.vue
@@ -0,0 +1,343 @@
+<!-- 鏃ュ父淇濆吇 缂栬緫 -->
+<template>
+    <!-- 鏂板寮规 -->
+    <el-dialog
+        :title="title"
+        width="80%"
+        :visible.sync="dialogVisibleAdd" class="role-select">
+         <!-- 鏌ヨ琛ㄥ崟 -->
+        <el-form :model="dataForm" ref="dataForm" label-width="150px" style="margin-top:10px;">
+            <el-row>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="缁熶竴缂栧彿" prop="uuid">
+                        <el-input type="text" v-model="dataForm.uuid" autocomplete="off"></el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="璁惧鍚嶇О" prop="machineName">
+                        <el-select v-model="dataForm.machineName" placeholder="---璇烽�夋嫨---">
+                            <el-option
+                            v-for="item in machineName"
+                            :key="item.id"
+                            :label="item.label"
+                            :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="璁惧鍨嬪彿" prop="type">
+                        <el-input size="mini" type="text" v-model="dataForm.type"></el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="璁惧瑙勬牸" prop="specification">
+                        <el-input size="mini" type="text" v-model="dataForm.specification" @input="getMachineInfo"></el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="瀹夎鍦扮偣" prop="location">
+                        <el-input size="mini" type="text" v-model="dataForm.location"></el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="浣跨敤閮ㄩ棬" prop="department">
+                        <el-select v-model="dataForm.department" placeholder="---璇烽�夋嫨---" clearable >
+                            <el-option
+                            v-for="item in department"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="淇濆吇鑰�" prop="maintainPerson">
+                        <el-select v-model="dataForm.maintainPerson" placeholder="---璇烽�夋嫨---" clearable >
+                            <el-option
+                            v-for="item in maintainPerson"
+                            :key="item.id"
+                            :label="item.label"
+                            :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <!-- <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="淇濆吇鍛ㄦ湡" prop="maintainPeriod">
+                        <el-input size="mini" type="text" v-model="dataForm.maintainPeriod"></el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="鎶曚骇鏃ユ湡" prop="productionDate">
+                        <el-input size="mini" type="text" v-model="dataForm.productionDate"></el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="鐢熶骇鍘傚" prop="manufacturer">
+                        <el-input size="mini" type="text" v-model="dataForm.manufacturer"></el-input>
+                    </el-form-item>
+                </el-col> -->
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="璁″垝鐘舵��" prop="planStatus">
+                        <el-input size="mini" type="text" v-model="dataForm.planStatus" readonly></el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="鏄惁鍚堟牸" prop="isQualified">
+                        <el-select v-model="dataForm.isQualified" placeholder="---璇烽�夋嫨---" clearable >
+                            <el-option
+                            v-for="item in isQualified"
+                            :key="item.id"
+                            :label="item.label"
+                            :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="璁″垝寮�濮嬫棩鏈�" prop="planStartDate">
+                        <el-date-picker
+                        format="yyyy 骞� MM 鏈� dd 鏃�"
+                        value-format="yyyy-MM-dd"
+                        v-model="dataForm.planStartDate"
+                        type="daterange"
+                        range-separator="鑷�"
+                        start-placeholder="寮�濮嬫棩鏈�"
+                        end-placeholder="缁撴潫鏃ユ湡">
+                        </el-date-picker>
+                    </el-form-item>
+                </el-col>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="璁″垝瀹屾垚鏃ユ湡" prop="planFinishDate">
+                        <el-date-picker
+                        format="yyyy 骞� MM 鏈� dd 鏃�"
+                        value-format="yyyy-MM-dd"
+                        v-model="dataForm.planFinishDate"
+                        type="daterange"
+                        range-separator="鑷�"
+                        start-placeholder="寮�濮嬫棩鏈�"
+                        end-placeholder="缁撴潫鏃ユ湡">
+                        </el-date-picker>
+                    </el-form-item>
+                </el-col>
+                <el-col :xs="24":sm="12":md="12":lg="12":xl="12">
+                    <el-form-item label="淇濆吇鍐呭涓庡瓨鍦ㄩ棶棰�" prop="detail">
+                        <el-input size="mini" type="text" v-model="dataForm.detail"></el-input>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+        </el-form>
+        <div style="display: flex;justify-content: center;align-items: center;margin-top:15px;">
+            <el-button size="mini" type="primary" @click="savedata()" plain>淇濆瓨</el-button>
+            <el-button size="mini" type="warning" @click="resetForm()" plain>閲嶇疆</el-button>
+        </div>
+
+    </el-dialog>
+</template>
+
+<script>
+// import { getMachineList, maintainCreate, maintainUpdate, deviceManage, userList, departmentGet } from '@/api/MdcApi'
+import { getMachineList, maintainCreate, maintainUpdate, userList, departmentGet } from '@/api/MdcApi'
+export default {
+  props: ['styles'],
+  data() {
+    return {
+      dataForm: {
+        style: '鏃ュ父淇濆吇',
+        state: 1,
+        machineName: '', // 璁惧鍚嶇О
+        uuid: '', // 鍚屾剰缂栫爜
+        type: '', // 璁惧绫诲瀷
+        specification: '', // 璁惧瑙勬牸
+        location: '', // 瀹夎浣嶇疆
+        department: '', // 浣跨敤鍗曚綅
+        maintainPerson: '', // 淇濆吇鑰�
+        productionDate: '', // 鎶曚骇鏃ユ湡
+        manufacturer: '', // 鐢熶骇鍘傚
+        planStatus: '1', // 璁″垝鐘舵��
+        isQualified: '鍚堟牸',
+        planStartDate: '',
+        planFinishDate: '',
+        detail: '' // 淇濆吇鍐呭涓庡瓨鍦ㄩ棶棰�
+      },
+      dialogVisibleAdd: false,
+      // 涓嬫媺妗�
+      machineName: [], // 璁惧鍚嶇О
+      department: [], // 浣跨敤閮ㄩ棬
+      maintainPerson: [], // 璁惧鍚嶇О
+      isQualified: [{ // 鏄惁鍚堟牸
+        label: '鍚堟牸',
+        value: '鍚堟牸'
+      }, {
+        label: '涓嶅悎鏍�',
+        value: '涓嶅悎鏍�'
+      }], // 璁惧鍚嶇О
+      title: '鏂板',
+      data: null, // 缂栬緫鏁版嵁鍥炲~
+      no: null
+    }
+  },
+  methods: {
+    // 鍒濆鍖�
+    init(n, data) {
+      this.data = data
+      this.no = n
+      if (this.styles === '1') {
+        this.dataForm.style = '鏃ュ父淇濆吇'
+      } else if (this.styles === '2') {
+        this.dataForm.style = '涓�绾т繚鍏�'
+      } else if (this.styles === '3') {
+        this.dataForm.style = '浜岀骇淇濆吇'
+      } else {
+        this.dataForm.style = '涓夌骇淇濆吇'
+      }
+      if (n === 1) {
+        this.title = '鏂板' + this.dataForm.style
+        this.dataForm.machineName = ''
+        this.dataForm.uuid = ''
+        this.dataForm.type = ''
+        this.dataForm.specification = ''
+        this.dataForm.location = ''
+        this.dataForm.department = ''
+        this.dataForm.maintainPerson = ''
+        this.dataForm.productionDate = ''
+        this.dataForm.manufacturer = ''
+        this.dataForm.planStartDate = ''
+        this.dataForm.planFinishDate = ''
+        this.dataForm.isQualified = '鍚堟牸'
+        this.dataForm.detail = ''
+      } else {
+        this.title = '淇敼' + this.dataForm.styles
+        this.dataForm.machineName = this.data.machineName
+        this.dataForm.uuid = this.data.uuid
+        this.dataForm.type = this.data.type
+        this.dataForm.specification = this.data.specification
+        this.dataForm.location = this.data.location
+        this.dataForm.department = this.data.department
+        this.dataForm.maintainPerson = this.data.userName
+        this.dataForm.isQualified = this.data.isQualified === '0' ? '涓嶅悎鏍�' : '鍚堟牸'
+        this.dataForm.manufacturer = this.data.manufacturer
+        this.dataForm.detail = this.data.detail
+      }
+      this.dialogVisibleAdd = true
+      this.machineName = []
+      this.maintainPerson = []
+      this.initDevices() // 鍒濆鍖栨暟鎹�
+    },
+    // 淇濆瓨
+    savedata() {
+      // 鏂板淇濆瓨
+      // const style = 1
+      const startDateFrom = this.dataForm.planStartDate[0]
+      const startDateTo = this.dataForm.planStartDate[1]
+      const completeDateFrom = this.dataForm.planFinishDate[0]
+      const completeDateTo = this.dataForm.planFinishDate[1]
+      const isQualified = this.dataForm.isQualified === '鍚堟牸' ? 1 : 0
+      if (this.no === 1) {
+        maintainCreate(
+          this.styles, this.dataForm.uuid, this.dataForm.machineName, this.dataForm.type,
+          this.dataForm.specification, this.dataForm.department, this.dataForm.location,
+          startDateFrom, startDateTo, completeDateFrom, completeDateTo, isQualified,
+          this.dataForm.state, this.dataForm.detail
+        ).then(res => {
+          if (res.result === 'SUCCESS') {
+            this.$message({
+              type: 'success',
+              message: '淇濆瓨鎴愬姛!'
+            })
+            this.$emit('reflash')
+            // const that = this
+            this.dialogVisibleAdd = false
+          } else {
+            this.$message({
+              type: 'error',
+              message: res.result
+            })
+          }
+        })
+      } else {
+        // 淇敼淇濆瓨
+        maintainUpdate(this.styles, this.data.id, this.dataForm.uuid, this.dataForm.machineName, this.dataForm.type,
+          this.dataForm.specification, this.dataForm.department, this.dataForm.location,
+          startDateFrom, startDateTo, completeDateFrom, completeDateTo, isQualified,
+          this.dataForm.state, this.dataForm.detail).then(res => {
+          if (res.result === 'SUCCESS') {
+            this.$message({
+              type: 'success',
+              message: '淇濆瓨鎴愬姛!'
+            })
+            this.$emit('reflash')
+          } else {
+            this.$message({
+              type: 'error',
+              message: res.result
+            })
+          }
+        })
+      }
+    },
+    /**
+         * 鍒濆鍖栧凡鏈夋満搴�
+         */
+    initDevices() {
+      this.machineName = []
+      this.maintainPerson = []
+      this.department = []
+      // 璁惧鍚嶇О
+      getMachineList().then(res => {
+        res.list.map(item => {
+          this.machineName.push({
+            label: item.name,
+            value: item.name,
+            id: item.id
+          })
+        })
+      })
+      // 浣跨敤鍗曚綅
+      userList().then(res => {
+        res.list.map(elem => {
+          this.maintainPerson.push({
+            label: elem.user,
+            value: elem.user,
+            id: elem.id
+          })
+          //    .split('_')[1]
+        })
+      })
+      // 鑾峰彇閮ㄩ棬
+      departmentGet().then(res => {
+        res.list.map(elem => {
+          this.department.push({
+            label: elem.name,
+            value: elem.name,
+            id: elem.id
+          })
+        })
+      })
+    },
+    // 璁惧鍚嶇О甯﹀嚭
+    getMachineInfo() {
+      // deviceManage(this.dataForm.machineName, this.dataForm.type, this.dataForm.specification).then(res => {
+      //
+      // })
+    },
+    // 閲嶇疆
+    resetForm() {
+      this.$refs.dataForm.resetFields()
+    }
+  },
+  created() {
+    this.initDevices()
+  }
+}
+</script>
+
+<style scoped>
+    .el-table__body .cell{padding:3px;}
+    .el-input__icon{line-height: 30px;}
+    .el-input__inner{height:30px;line-height: 30px;}
+    .el-form-item__content{line-height: 40px;}
+    .el-col{height:36px;}
+</style>
diff --git a/src/container/maintenance/index.vue b/src/container/maintenance/index.vue
index e669334..85b8941 100644
--- a/src/container/maintenance/index.vue
+++ b/src/container/maintenance/index.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2024-01-06 17:40:19
  * @LastEditors: Sneed
- * @LastEditTime: 2024-01-09 00:37:23
+ * @LastEditTime: 2024-01-13 11:33:27
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/maintenance/index.vue
 -->
 <template>
@@ -65,27 +65,112 @@
                     </el-date-picker>
                 </div>
                 <div class="item">
-                    <div class="query btn">鏌ヨ</div>
+                    <el-button type="primary" size="small" @click="query">鏌ヨ</el-button>
                 </div>
                 <div class="item">
-                    <div class="reset btn">閲嶇疆</div>
+                    <el-button type="primary" size="small" @click="reset">閲嶇疆</el-button>
                 </div>
+            </template>
+            <template slot="table-tool">
+                <el-button type="primary" size="mini" @click="add">娣诲姞</el-button>
             </template>
             <template slot="columns">
                 <el-table-column
-                    prop="date"
-                    label="鏃ユ湡"
-                    width="180">
-                </el-table-column>
-                <el-table-column
-                    prop="name"
-                    label="濮撳悕"
-                    width="180">
-                </el-table-column>
-                <el-table-column
-                    prop="address"
-                    label="鍦板潃">
-                </el-table-column>
+                type="selection"
+                align="center"
+                width="55">
+            </el-table-column>
+            <el-table-column
+                align="center"
+                label="缁熶竴缂栧彿"
+                prop="uuid">
+            </el-table-column>
+            <el-table-column
+                align="center"
+                label="璁惧鍚嶇О"
+                width="150"
+                :show-overflow-tooltip="true"
+                prop="machineName">
+            </el-table-column>
+            <el-table-column
+                align="center"
+                label="璁惧鍨嬪彿"
+                prop="type">
+            </el-table-column>
+            <el-table-column
+                align="center"
+                label="璁惧瑙勬牸"
+                prop="specification">
+            </el-table-column>
+            <el-table-column
+                align="center"
+                label="浣跨敤鍗曚綅"
+                prop="department">
+            </el-table-column>
+            <el-table-column
+                align="center"
+                label="淇濆吇鑰�"
+                prop="userName">
+            </el-table-column>
+            <el-table-column
+                align="center"
+                label="淇濆吇鍛ㄦ湡"
+                prop="period">
+            </el-table-column>
+            <el-table-column
+                align="center"
+                label="淇濆吇绫诲瀷"
+                prop="style">
+                <template slot-scope="scope">
+                    <span>{{scope.row.style === "1" ? "鏃ュ父淇濆吇" : scope.row.style === "2" ? "涓�绾т繚鍏�" :
+                      scope.row.style === "3" ? "浜岀骇淇濆吇" : "涓夌骇淇濆吇" }}</span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                align="center"
+                width="110"
+                label="鏄惁鍚堟牸"
+                prop="isQualified">
+                <template slot-scope="scope">
+                    <span>{{scope.row.isQualified === "1"? "鍚堟牸" : "涓嶅悎鏍�"}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                align="center"
+                width="120"
+                :show-overflow-tooltip="true"
+                label="璁″垝寮�濮嬫椂闂�">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.startDateFrom">{{scope.row.startDateFrom+ '~' +scope.row.startDateTo}}</span>
+                    <span v-else></span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                align="center"
+                width="120"
+                :show-overflow-tooltip="true"
+                label="璁″垝瀹屾垚鏃堕棿">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.completeDateFrom">{{scope.row.completeDateFrom+ '~' +scope.row.completeDateTo}}</span>
+                    <span v-else></span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                align="center"
+                width="150"
+                :show-overflow-tooltip="true"
+                label="淇濆吇鍐呭涓庡瓨鍦ㄩ棶棰�"
+                prop="detail">
+            </el-table-column>
+            <el-table-column
+                align="center"
+                label="缂栬緫"
+                prop="editor">
+                <template slot-scope="scope">
+                    <el-button size="mini" type="text" @click="addDevice(2,scope.row,$event)">缂栬緫</el-button>
+                    <el-button size="mini" type="text" @click="deleteHandle(2,scope.row)">鍒犻櫎</el-button>
+                </template>
+            </el-table-column>
             </template>
         </List>
     </div>
@@ -115,51 +200,64 @@
             border: 1px solid #435F9E;
         }
     }
+    .el-button--mini {
+        background: transparent;
+    }
+    .el-button--primary {
+        background-color: transparent;
+    }
 }
 </style>
 <style lang="scss" scoped>
-    .maintenance {
-        width: 100%;
-        height: 100%;
-        overflow: hidden;
-        color: #FFF;
+.maintenance {
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+    color: #FFF;
+    display: flex;
+    flex-direction: column;
+
+    .nav {
+        padding: 10px 30px;
+    }
+
+    .item {
+        margin-top: 20px;
+        margin-left: 50px;
         display: flex;
-        flex-direction: column;
-        .nav {
-            padding: 10px 30px;
+        align-items: center;
+
+        span {
+            width: 120px;
+            font-size: 16px;
+            font-family: PingFangSC, PingFang SC;
+            color: #C6DCE0;
+            text-align: right;
+            padding-right: 20px;
         }
-        .item {
-            margin-top: 20px;
-            margin-left: 50px;
-            display: flex;
-            align-items: center;
-            span {
-                width: 120px;
-                font-size: 16px;
-                font-family: PingFangSC, PingFang SC;
-                color: #C6DCE0;
-                text-align: right;
-                padding-right: 20px;
-            }
-            .item-value {
-                width: 200px;
-                border: 1px solid #435F9E;
-            }
-            .btn {
-                line-height: 1.5;
-                width: 100px;
-                text-align: center;
-                font-size: 16px;
-                cursor: pointer;
-            }
-            .reset {
-                background: #AAB6BA;
-                color: #FFF;
-            }
-            .query {
-                background: #5DD1FC;
-                color: #FFF;
-            }
+
+        .item-value {
+            width: 200px;
+            border: 1px solid #435F9E;
+        }
+
+        .btn {
+            line-height: 1.5;
+            width: 100px;
+            text-align: center;
+            font-size: 16px;
+            cursor: pointer;
+        }
+
+        .reset {
+            background: #AAB6BA;
+            color: #FFF;
+        }
+
+        .query {
+            background: #5DD1FC;
+            color: #FFF;
         }
     }
+}
 </style>
\ No newline at end of file
diff --git a/src/router/index.js b/src/router/index.js
index 3396503..7f2f542 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -62,7 +62,7 @@
         name: 'ledger',
         component: () => import('@/container/ledger/index')
       },
-      // 鍙拌处
+      // 璁惧绫诲瀷绠$悊
       {
         path: 'deviceType',
         name: 'deviceType',
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 70c6499..26f4fdd 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -60,7 +60,6 @@
   actions: {
     // 鐧诲綍
     Login({ commit, store }, userInfo) {
-      debugger
       const username = userInfo.username.trim()
       return new Promise((resolve, reject) => {
         login(username, userInfo.password).then(response => {

--
Gitblit v1.9.3