|
@@ -1,5 +1,8 @@
|
|
|
<template>
|
|
<template>
|
|
|
<el-container class="content-height-fit">
|
|
<el-container class="content-height-fit">
|
|
|
|
|
+ <!-- <inner-sidebar>
|
|
|
|
|
+ <ProjectSectionTree @node-click="handleTreeClick" />
|
|
|
|
|
+ </inner-sidebar> -->
|
|
|
<el-container class="resize-fit-container">
|
|
<el-container class="resize-fit-container">
|
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
|
<div class="filter-container blue-top-border">
|
|
<div class="filter-container blue-top-border">
|
|
@@ -41,6 +44,7 @@
|
|
|
@click="handleFilter"
|
|
@click="handleFilter"
|
|
|
>查询</el-button>
|
|
>查询</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
|
|
+ v-if="$requirePermission('BSET.DVMG.C')"
|
|
|
v-waves
|
|
v-waves
|
|
|
class="filter-item"
|
|
class="filter-item"
|
|
|
type="primary"
|
|
type="primary"
|
|
@@ -60,12 +64,23 @@
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
height="calc(100vh - 276px)"
|
|
height="calc(100vh - 276px)"
|
|
|
>
|
|
>
|
|
|
|
|
+ <div slot="empty">
|
|
|
|
|
+ <span v-if="listQuery.sectionId">没有数据</span>
|
|
|
|
|
+ <span v-else>请选择标段</span>
|
|
|
|
|
+ </div>
|
|
|
<el-table-column label="序号" type="index" width="50" align="center" />
|
|
<el-table-column label="序号" type="index" width="50" align="center" />
|
|
|
|
|
+ <!-- <el-table-column label="工区名称" align="center">
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
|
+ {{ getAreaName(row.sectionAreaId) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column> -->
|
|
|
<el-table-column label="设备编号" prop="deviceNo" :show-overflow-tooltip="true" align="center" />
|
|
<el-table-column label="设备编号" prop="deviceNo" :show-overflow-tooltip="true" align="center" />
|
|
|
<el-table-column label="设备名称" prop="deviceName" :show-overflow-tooltip="true" align="center" />
|
|
<el-table-column label="设备名称" prop="deviceName" :show-overflow-tooltip="true" align="center" />
|
|
|
<el-table-column label="类型名称" prop="categoryName" :show-overflow-tooltip="true" align="center" />
|
|
<el-table-column label="类型名称" prop="categoryName" :show-overflow-tooltip="true" align="center" />
|
|
|
<el-table-column label="规格型号" prop="spec" :show-overflow-tooltip="true" align="center" />
|
|
<el-table-column label="规格型号" prop="spec" :show-overflow-tooltip="true" align="center" />
|
|
|
<el-table-column label="制造厂家" prop="madeFactory" :show-overflow-tooltip="true" align="center" />
|
|
<el-table-column label="制造厂家" prop="madeFactory" :show-overflow-tooltip="true" align="center" />
|
|
|
|
|
+ <el-table-column label="司机姓名" prop="driverName" width="80" align="center" />
|
|
|
|
|
+ <el-table-column label="联系电话" prop="telephone" width="120" align="center" />
|
|
|
<el-table-column label="累计过孔数" prop="viaCount" width="100" align="center" />
|
|
<el-table-column label="累计过孔数" prop="viaCount" width="100" align="center" />
|
|
|
<el-table-column label="累计工作时间" prop="allTime" width="110" align="center" />
|
|
<el-table-column label="累计工作时间" prop="allTime" width="110" align="center" />
|
|
|
<el-table-column label="是否在线" width="80" align="center">
|
|
<el-table-column label="是否在线" width="80" align="center">
|
|
@@ -83,11 +98,13 @@
|
|
|
>
|
|
>
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
<el-button
|
|
<el-button
|
|
|
|
|
+ v-if="$requirePermission('BSET.DVMG.U')"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
@click="handleUpdate(row)"
|
|
@click="handleUpdate(row)"
|
|
|
>修改</el-button>
|
|
>修改</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
|
|
+ v-if="$requirePermission('BSET.DVMG.D')"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="danger"
|
|
type="danger"
|
|
|
@click="handleDelete(row)"
|
|
@click="handleDelete(row)"
|
|
@@ -117,29 +134,17 @@
|
|
|
>
|
|
>
|
|
|
<el-row :gutter="16">
|
|
<el-row :gutter="16">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="工区" prop="sectionAreaId">
|
|
|
|
|
- <el-select v-model="entity.sectionAreaId" class="w100p">
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in areas"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- :value="item.id"
|
|
|
|
|
- :label="item.name"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
<el-form-item label="设备编号" prop="deviceNo">
|
|
<el-form-item label="设备编号" prop="deviceNo">
|
|
|
<el-input v-model="entity.deviceNo" :show-overflow-tooltip="true" />
|
|
<el-input v-model="entity.deviceNo" :show-overflow-tooltip="true" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
|
|
- <el-row :gutter="16">
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="设备名称" prop="deviceName">
|
|
<el-form-item label="设备名称" prop="deviceName">
|
|
|
<el-input v-model="entity.deviceName" :show-overflow-tooltip="true" />
|
|
<el-input v-model="entity.deviceName" :show-overflow-tooltip="true" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="16">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="设备类型" prop="deviceType">
|
|
<el-form-item label="设备类型" prop="deviceType">
|
|
|
<el-select v-model="entity.deviceType" class="w100p">
|
|
<el-select v-model="entity.deviceType" class="w100p">
|
|
@@ -152,55 +157,38 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
|
|
-
|
|
|
|
|
- <el-row :gutter="16">
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="规格型号">
|
|
<el-form-item label="规格型号">
|
|
|
<el-input v-model="entity.spec" />
|
|
<el-input v-model="entity.spec" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="16">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="制造厂家" align="left">
|
|
<el-form-item label="制造厂家" align="left">
|
|
|
<el-input v-model="entity.madeFactory" align="left" controls-position="right" style="width: 100%;" />
|
|
<el-input v-model="entity.madeFactory" align="left" controls-position="right" style="width: 100%;" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
|
|
- <el-row :gutter="16">
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="司机姓名" align="left">
|
|
<el-form-item label="司机姓名" align="left">
|
|
|
<el-input v-model="entity.driverName" align="left" controls-position="right" style="width: 100%;" />
|
|
<el-input v-model="entity.driverName" align="left" controls-position="right" style="width: 100%;" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="16">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="联系电话" align="left">
|
|
<el-form-item label="联系电话" align="left">
|
|
|
<el-input v-model="entity.telephone" align="left" controls-position="right" style="width: 100%;" />
|
|
<el-input v-model="entity.telephone" align="left" controls-position="right" style="width: 100%;" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
|
|
- <el-row v-if="entity.deviceType === 1" :gutter="16">
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="架桥机类型" prop="category">
|
|
|
|
|
- <el-select v-model="entity.category" class="w100p">
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in jqjTypes"
|
|
|
|
|
- :key="item.code"
|
|
|
|
|
- :value="item.code"
|
|
|
|
|
- :label="item.name"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- <el-row v-if="entity.deviceType === 2" :gutter="16">
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="运梁车类型" prop="category">
|
|
|
|
|
- <el-select v-model="entity.category" class="w100p">
|
|
|
|
|
|
|
+ <el-form-item label="铁科院信息" prop="deviceType">
|
|
|
|
|
+ <el-select v-model="entity.tkySectionId" class="w100p">
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in ylcTypes"
|
|
|
|
|
- :key="item.code"
|
|
|
|
|
- :value="item.code"
|
|
|
|
|
- :label="item.name"
|
|
|
|
|
|
|
+ v-for="item in authSections"
|
|
|
|
|
+ :key="item.key"
|
|
|
|
|
+ :value="item.sectionId"
|
|
|
|
|
+ :label="item.sectionName"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -226,9 +214,14 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import * as interfaceApi from '@/api/device-manage.js'
|
|
import * as interfaceApi from '@/api/device-manage.js'
|
|
|
|
|
+import * as tkyApi from '@/api/tky-api'
|
|
|
import * as areaApi from '@/api/backbone/section-area'
|
|
import * as areaApi from '@/api/backbone/section-area'
|
|
|
|
|
+// import ProjectSectionTree from '@/views/projects/components/ProjectSectionTree'
|
|
|
|
|
+
|
|
|
import waves from '@/directive/waves' // waves directive
|
|
import waves from '@/directive/waves' // waves directive
|
|
|
import Pagination from '@/components/Pagination' // secondary package based on el-pagination
|
|
import Pagination from '@/components/Pagination' // secondary package based on el-pagination
|
|
|
|
|
+import _ from 'lodash'
|
|
|
|
|
+// import InnerSidebar from '@/components/InnerSidebar'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'DeviceMng',
|
|
name: 'DeviceMng',
|
|
@@ -238,13 +231,17 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
list: [],
|
|
list: [],
|
|
|
deviceTypes: [
|
|
deviceTypes: [
|
|
|
- { key: 1, name: '架桥机' },
|
|
|
|
|
- { key: 2, name: '运梁车' }
|
|
|
|
|
|
|
+ { key: 0, name: '架桥机' },
|
|
|
|
|
+ { key: 1, name: '运梁车' },
|
|
|
|
|
+ { key: 2, name: '运架一体车' }
|
|
|
],
|
|
],
|
|
|
entity: {},
|
|
entity: {},
|
|
|
total: 0,
|
|
total: 0,
|
|
|
listLoading: false,
|
|
listLoading: false,
|
|
|
listQuery: {
|
|
listQuery: {
|
|
|
|
|
+ projectId: undefined,
|
|
|
|
|
+ sectionId: undefined,
|
|
|
|
|
+ sectionAreaId: undefined,
|
|
|
deviceNo: '',
|
|
deviceNo: '',
|
|
|
deviceName: '',
|
|
deviceName: '',
|
|
|
deviceType: undefined,
|
|
deviceType: undefined,
|
|
@@ -258,7 +255,8 @@ export default {
|
|
|
update: '修改',
|
|
update: '修改',
|
|
|
create: '创建'
|
|
create: '创建'
|
|
|
},
|
|
},
|
|
|
- sections: [],
|
|
|
|
|
|
|
+ areas: [],
|
|
|
|
|
+ authSections: [],
|
|
|
rules: {
|
|
rules: {
|
|
|
deviceNo: [
|
|
deviceNo: [
|
|
|
{ required: true, message: '请输入设备编号', trigger: 'blur' },
|
|
{ required: true, message: '请输入设备编号', trigger: 'blur' },
|
|
@@ -270,21 +268,10 @@ export default {
|
|
|
],
|
|
],
|
|
|
deviceType: [
|
|
deviceType: [
|
|
|
{ required: true, message: '请选择设备类型', trigger: 'blur' }
|
|
{ required: true, message: '请选择设备类型', trigger: 'blur' }
|
|
|
- ],
|
|
|
|
|
- sectionAreaId: [
|
|
|
|
|
- { required: true, message: '请选择工区', trigger: 'blur' }
|
|
|
|
|
- ],
|
|
|
|
|
- category: [
|
|
|
|
|
- { required: true, message: '请选择架桥机类型', trigger: 'blur' }
|
|
|
|
|
]
|
|
]
|
|
|
- },
|
|
|
|
|
- areas: [],
|
|
|
|
|
- jqjTypes: [],
|
|
|
|
|
- ylcTypes: []
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- watch: {
|
|
|
|
|
- },
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
|
try {
|
|
try {
|
|
|
this.$store.dispatch('user/clientCredentials')
|
|
this.$store.dispatch('user/clientCredentials')
|
|
@@ -292,27 +279,13 @@ export default {
|
|
|
} catch (ex) {
|
|
} catch (ex) {
|
|
|
console.log(ex)
|
|
console.log(ex)
|
|
|
}
|
|
}
|
|
|
|
|
+ tkyApi.getAuthSectionInfo()
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ this.authSections = res.data
|
|
|
|
|
+ })
|
|
|
this.getList()
|
|
this.getList()
|
|
|
- // this.getJQJTypes()
|
|
|
|
|
- // this.getYLCTypes()
|
|
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- // getJQJTypes() {
|
|
|
|
|
- // dictEntryApi.getJQJTypes().then(res => {
|
|
|
|
|
- // res.forEach(t => {
|
|
|
|
|
- // t.code = t.code - 0
|
|
|
|
|
- // })
|
|
|
|
|
- // this.jqjTypes = res
|
|
|
|
|
- // })
|
|
|
|
|
- // },
|
|
|
|
|
- // getYLCTypes() {
|
|
|
|
|
- // dictEntryApi.getYLCTypes().then(res => {
|
|
|
|
|
- // res.forEach(t => {
|
|
|
|
|
- // t.code = t.code - 0
|
|
|
|
|
- // })
|
|
|
|
|
- // this.ylcTypes = res
|
|
|
|
|
- // })
|
|
|
|
|
- // },
|
|
|
|
|
// 树形事件
|
|
// 树形事件
|
|
|
handleTreeClick(data, node) {
|
|
handleTreeClick(data, node) {
|
|
|
this.listQuery.projectId = undefined
|
|
this.listQuery.projectId = undefined
|
|
@@ -339,14 +312,14 @@ export default {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- getAreaName(areaId) {
|
|
|
|
|
- const area = this.areas.find(t => t.id === areaId)
|
|
|
|
|
- if (area) {
|
|
|
|
|
- return area.name
|
|
|
|
|
- } else {
|
|
|
|
|
- return ''
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // getAreaName(areaId) {
|
|
|
|
|
+ // const area = this.areas.find(t => t.id === areaId)
|
|
|
|
|
+ // if (area) {
|
|
|
|
|
+ // return area.name
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // return ''
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
// 清空下拉
|
|
// 清空下拉
|
|
|
delValue(parameter) {
|
|
delValue(parameter) {
|
|
|
this.listQuery[parameter] = undefined
|
|
this.listQuery[parameter] = undefined
|
|
@@ -369,31 +342,9 @@ export default {
|
|
|
this.listQuery.skipCount = 0
|
|
this.listQuery.skipCount = 0
|
|
|
this.getList()
|
|
this.getList()
|
|
|
},
|
|
},
|
|
|
- // 创建清空
|
|
|
|
|
- resetStation() {
|
|
|
|
|
- this.entity = {
|
|
|
|
|
- id: undefined,
|
|
|
|
|
- projectId: this.listQuery.projectId,
|
|
|
|
|
- sectionId: this.listQuery.sectionId,
|
|
|
|
|
- sectionAreaId: this.listQuery.sectionAreaId,
|
|
|
|
|
- deviceNo: '',
|
|
|
|
|
- deviceName: '',
|
|
|
|
|
- category: undefined,
|
|
|
|
|
- categoryName: '',
|
|
|
|
|
- spec: '',
|
|
|
|
|
- madeFactory: '',
|
|
|
|
|
- driverName: '',
|
|
|
|
|
- telephone: '',
|
|
|
|
|
- deviceType: undefined
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
// 创建点击事件
|
|
// 创建点击事件
|
|
|
handleCreate() {
|
|
handleCreate() {
|
|
|
- if (!this.listQuery.sectionId) {
|
|
|
|
|
- this.verificationTips('请选择标段')
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- this.resetStation()
|
|
|
|
|
|
|
+ this.entity = {}
|
|
|
this.dialogStatus = 'create'
|
|
this.dialogStatus = 'create'
|
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|
|
|
this.formLoading = false
|
|
this.formLoading = false
|
|
@@ -401,25 +352,20 @@ export default {
|
|
|
this.$refs['dataForm'].clearValidate()
|
|
this.$refs['dataForm'].clearValidate()
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- // 提示
|
|
|
|
|
- verificationTips(message) {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: message,
|
|
|
|
|
- type: 'error',
|
|
|
|
|
- duration: 2000
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ loadAuthSection(sectionId) {
|
|
|
|
|
+ var authSeciton = _.find(this.authSections, { 'sectionId': sectionId })
|
|
|
|
|
+ if (authSeciton !== undefined) {
|
|
|
|
|
+ this.entity.tkyProjectId = authSeciton.projectId
|
|
|
|
|
+ this.entity.tkyProjectName = authSeciton.projectName
|
|
|
|
|
+ this.entity.tkySectionName = authSeciton.sectionName
|
|
|
|
|
+ this.entity.authCode = authSeciton.authCode
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
// 创建
|
|
// 创建
|
|
|
createData() {
|
|
createData() {
|
|
|
this.$refs['dataForm'].validate(valid => {
|
|
this.$refs['dataForm'].validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- if (this.entity.deviceType === 1) {
|
|
|
|
|
- this.entity.categoryName = this.jqjTypes.find(t => t.code === this.entity.category).name
|
|
|
|
|
- }
|
|
|
|
|
- if (this.entity.deviceType === 2) {
|
|
|
|
|
- this.entity.categoryName = this.ylcTypes.find(t => t.code === this.entity.category).name
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.loadAuthSection(this.entity.tkySectionId)
|
|
|
this.formLoading = true
|
|
this.formLoading = true
|
|
|
interfaceApi
|
|
interfaceApi
|
|
|
.create(this.entity)
|
|
.create(this.entity)
|
|
@@ -453,12 +399,7 @@ export default {
|
|
|
updateData() {
|
|
updateData() {
|
|
|
this.$refs['dataForm'].validate(valid => {
|
|
this.$refs['dataForm'].validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- if (this.entity.deviceType === 1) {
|
|
|
|
|
- this.entity.categoryName = this.jqjTypes.find(t => t.code === this.entity.category).name
|
|
|
|
|
- }
|
|
|
|
|
- if (this.entity.deviceType === 2) {
|
|
|
|
|
- this.entity.categoryName = this.ylcTypes.find(t => t.code === this.entity.category).name
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.loadAuthSection(this.entity.tkySectionId)
|
|
|
const submitData = Object.assign({}, this.entity)
|
|
const submitData = Object.assign({}, this.entity)
|
|
|
this.formLoading = true
|
|
this.formLoading = true
|
|
|
interfaceApi
|
|
interfaceApi
|