gaosp
2024-01-13 b524dc50dedb0e6d8ae0a432ae2d436829da9319
update
已修改6个文件
已添加1个文件
787 ■■■■ 文件已修改
src/container/component/index.vue 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/container/deviceType/index.vue 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/container/ledger/index.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/container/maintenance/dailyMAdd.vue 343 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/container/maintenance/index.vue 210 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
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>
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>
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>
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>
src/router/index.js
@@ -62,7 +62,7 @@
        name: 'ledger',
        component: () => import('@/container/ledger/index')
      },
      // å°è´¦
      // è®¾å¤‡ç±»åž‹ç®¡ç†
      {
        path: 'deviceType',
        name: 'deviceType',
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 => {