|
@@ -2,16 +2,18 @@
|
|
|
<div v-if="visible">
|
|
|
<div class="card">
|
|
|
<a-tabs v-model="activeKey">
|
|
|
- <template v-for="(item,i) in components">
|
|
|
+ <template v-for="(item, i) in components">
|
|
|
<a-tab-pane v-if="item.show" :key="i">
|
|
|
<div slot="tab" v-if="item.badge">
|
|
|
- <a-badge :count="item.badge.count" :title="item.badge.title" :number-style="{ backgroundColor: '#52c41a' }">
|
|
|
+ <a-badge
|
|
|
+ :count="item.badge.count"
|
|
|
+ :title="item.badge.title"
|
|
|
+ :number-style="{ backgroundColor: '#52c41a' }"
|
|
|
+ >
|
|
|
<div class="tab-title">
|
|
|
<my-icon v-if="item.isMy" class="icon" :type="item.icon"></my-icon>
|
|
|
<a-icon v-else class="icon" :type="item.icon" />
|
|
|
- <div>
|
|
|
- {{ item.name }}
|
|
|
- </div>
|
|
|
+ <div>{{ item.name }}</div>
|
|
|
</div>
|
|
|
</a-badge>
|
|
|
</div>
|
|
@@ -37,11 +39,9 @@
|
|
|
<a-button type="default" :loading="confirmLoading" @click="handleOk()">刷新</a-button>
|
|
|
<a-button type="default" :loading="confirmLoading" @click="handleTuiCalendar(1)">检点日历</a-button>
|
|
|
<a-button type="primary" @click="handleBack">返回</a-button>
|
|
|
-
|
|
|
</a-space>
|
|
|
</div>
|
|
|
- <base-form ref="baseModal" @ok="handleOk"/>
|
|
|
-
|
|
|
+ <base-form ref="baseModal" @ok="handleOk" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -101,7 +101,7 @@ export default {
|
|
|
RepairReportSbInfo,
|
|
|
RepairReportSbInfoFee
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
visible: false,
|
|
|
confirmLoading: false,
|
|
@@ -122,7 +122,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- props () {
|
|
|
+ props() {
|
|
|
let props = null
|
|
|
switch (this.activeKey) {
|
|
|
case 0:
|
|
@@ -149,7 +149,7 @@ export default {
|
|
|
}
|
|
|
return props
|
|
|
},
|
|
|
- components () {
|
|
|
+ components() {
|
|
|
return [
|
|
|
{
|
|
|
name: '设备详情',
|
|
@@ -160,7 +160,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
name: '子设备',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'apartment',
|
|
|
show: true,
|
|
|
isMy: false,
|
|
|
component: 'Children',
|
|
@@ -171,7 +171,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
name: '设备部位',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'setting',
|
|
|
show: true,
|
|
|
isMy: false,
|
|
|
component: 'PartInfoList',
|
|
@@ -182,7 +182,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
name: '设备位号',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'environment',
|
|
|
show: true,
|
|
|
isMy: false,
|
|
|
component: 'LocationList',
|
|
@@ -193,9 +193,9 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
name: '备件BOM',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'icon-beijian',
|
|
|
show: true,
|
|
|
- isMy: false,
|
|
|
+ isMy: true,
|
|
|
component: 'SbModelBom',
|
|
|
badge: {
|
|
|
title: '备件总数',
|
|
@@ -204,9 +204,9 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
name: '点检标准',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'icon-richangjianchajilu',
|
|
|
show: true,
|
|
|
- isMy: false,
|
|
|
+ isMy: true,
|
|
|
component: 'CheckStandard',
|
|
|
badge: {
|
|
|
title: '点检标准',
|
|
@@ -215,7 +215,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
name: '点检任务',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'carry-out',
|
|
|
isMy: false,
|
|
|
show: true,
|
|
|
component: 'CheckJob',
|
|
@@ -226,70 +226,70 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
name: '检定记录',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'icon-shebeitaizhang',
|
|
|
show: this.model.useType === 4,
|
|
|
- isMy: false,
|
|
|
+ isMy: true,
|
|
|
component: 'DetailSbMeasure'
|
|
|
},
|
|
|
{
|
|
|
name: '设备履历',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'solution',
|
|
|
show: true,
|
|
|
isMy: false,
|
|
|
component: 'ChangeLogsDetail'
|
|
|
},
|
|
|
{
|
|
|
name: '配件记录',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'icon-gongdan',
|
|
|
show: true,
|
|
|
- isMy: false,
|
|
|
+ isMy: true,
|
|
|
component: 'SparePartUsedSelectTable'
|
|
|
},
|
|
|
{
|
|
|
name: '保养记录',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'icon-qichebaoyang',
|
|
|
show: true,
|
|
|
- isMy: false,
|
|
|
+ isMy: true,
|
|
|
component: 'PollingCheckJobFinish'
|
|
|
},
|
|
|
{
|
|
|
name: '历史故障',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'icon-shebeibaoxiu',
|
|
|
show: true,
|
|
|
- isMy: false,
|
|
|
+ isMy: true,
|
|
|
component: 'RepairForm'
|
|
|
},
|
|
|
{
|
|
|
name: '历史费用',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'account-book',
|
|
|
show: true,
|
|
|
isMy: false,
|
|
|
component: 'RepairFee'
|
|
|
},
|
|
|
{
|
|
|
name: '状态变更记录',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'pull-request',
|
|
|
show: true,
|
|
|
isMy: false,
|
|
|
component: 'SbStatusLog'
|
|
|
},
|
|
|
{
|
|
|
name: '停机记录',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'stop',
|
|
|
show: true,
|
|
|
isMy: false,
|
|
|
component: 'SbStopLog'
|
|
|
},
|
|
|
{
|
|
|
name: '遥测点位',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'radar-chart',
|
|
|
show: true,
|
|
|
isMy: false,
|
|
|
component: 'RemoteMeasure'
|
|
|
},
|
|
|
{
|
|
|
name: '设备树',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'cluster',
|
|
|
show: true,
|
|
|
isMy: false,
|
|
|
component: 'SbTreeModal'
|
|
@@ -303,14 +303,14 @@ export default {
|
|
|
// },
|
|
|
{
|
|
|
name: '工单分析',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'file-search',
|
|
|
show: true,
|
|
|
isMy: false,
|
|
|
component: 'RepairReportSbInfo'
|
|
|
},
|
|
|
{
|
|
|
name: '费用分析',
|
|
|
- icon: 'appstore',
|
|
|
+ icon: 'transaction',
|
|
|
show: true,
|
|
|
isMy: false,
|
|
|
component: 'RepairReportSbInfoFee'
|
|
@@ -319,19 +319,19 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- base (record) {
|
|
|
+ base(record) {
|
|
|
this.visible = true
|
|
|
this.model = record
|
|
|
this.fetchNum()
|
|
|
},
|
|
|
- handleEdit () {
|
|
|
+ handleEdit() {
|
|
|
fetchSbInfo({ id: this.model.id }).then(res => {
|
|
|
this.show = false
|
|
|
const modal = this.$refs.baseModal
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- handleOk () {
|
|
|
+ handleOk() {
|
|
|
this.confirmLoading = true
|
|
|
this.show = true
|
|
|
fetchSbInfo({ id: this.model.id }).then(res => {
|
|
@@ -339,12 +339,12 @@ export default {
|
|
|
this.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- handleBack () {
|
|
|
+ handleBack() {
|
|
|
this.visible = false
|
|
|
this.activeKey = 0
|
|
|
this.$emit('ok')
|
|
|
},
|
|
|
- handleTuiCalendar (level) {
|
|
|
+ handleTuiCalendar(level) {
|
|
|
const that = this
|
|
|
queryTuiCalendarIgnores({ sbId: this.model.id, type: level }).then(res => {
|
|
|
const a = document.createElement('a')
|
|
@@ -352,7 +352,7 @@ export default {
|
|
|
a.href = '/tui-calendar/checkJobCalendar.html?'
|
|
|
localStorage.setItem('calendarList', JSON.stringify(res.data.calendarList))
|
|
|
var scheduleList = res.data.scheduleList
|
|
|
- scheduleList.forEach((item) => {
|
|
|
+ scheduleList.forEach(item => {
|
|
|
item.start = that.BaseTool.Moment(item.start, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
item.end = that.BaseTool.Moment(item.end, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
})
|
|
@@ -360,7 +360,7 @@ export default {
|
|
|
a.click()
|
|
|
})
|
|
|
},
|
|
|
- fetchNum () {
|
|
|
+ fetchNum() {
|
|
|
Promise.all([
|
|
|
queryNumPartInfo({ sbId: this.model.id }),
|
|
|
queryNumModelbom({ sbId: this.model.id }),
|
|
@@ -374,7 +374,7 @@ export default {
|
|
|
queryNumSbLocation({ sbId: this.model.id }),
|
|
|
queryChildNumSbInfo({ parentId: this.model.id })
|
|
|
])
|
|
|
- .then((values) => {
|
|
|
+ .then(values => {
|
|
|
this.numPartInfo = values[0].data
|
|
|
this.numModelbom = values[1].data
|
|
|
this.numRepairReason = values[2].data
|
|
@@ -386,7 +386,8 @@ export default {
|
|
|
this.numCheckjob3 = values[8].data
|
|
|
this.numLocation = values[9].data
|
|
|
this.numChildSbInfo = values[10].data
|
|
|
- }).then(() => {
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
this.$forceUpdate()
|
|
|
})
|
|
|
}
|
|
@@ -395,31 +396,36 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-.card{
|
|
|
+.card {
|
|
|
background: #fff;
|
|
|
padding: 10px 10px 0 10px;
|
|
|
margin-bottom: 15px;
|
|
|
}
|
|
|
-.tab-title{
|
|
|
- text-align: center;
|
|
|
+.tab-title {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
font-size: 18px;
|
|
|
- .icon{
|
|
|
+ .icon {
|
|
|
font-size: 30px;
|
|
|
+ margin-bottom: 5px;
|
|
|
}
|
|
|
}
|
|
|
-.btn{
|
|
|
+.btn {
|
|
|
position: absolute;
|
|
|
bottom: 30px;
|
|
|
- left:50%;
|
|
|
+ left: 50%;
|
|
|
transform: translateX(-50%);
|
|
|
}
|
|
|
-/deep/.ant-tabs-bar{
|
|
|
- border:none;
|
|
|
+/deep/.ant-tabs-bar {
|
|
|
+ border: none;
|
|
|
}
|
|
|
-/deep/.ant-tabs-ink-bar{
|
|
|
+/deep/.ant-tabs-ink-bar {
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
-/deep/ .ant-tabs-tab-prev-icon-target,/deep/ .ant-tabs-tab-next-icon-target {
|
|
|
- font-size: 20px;
|
|
|
+/deep/ .ant-tabs-tab-prev-icon-target,
|
|
|
+/deep/ .ant-tabs-tab-next-icon-target {
|
|
|
+ font-size: 20px;
|
|
|
}
|
|
|
</style>
|