|
@@ -7,41 +7,58 @@
|
|
|
@cancel="handleCancel"
|
|
|
:footer="null"
|
|
|
>
|
|
|
- <div>
|
|
|
- <a-form layout="inline">
|
|
|
- <a-row >
|
|
|
- <a-col :md="8" :sm="24">
|
|
|
- <a-form-item label="关键字">
|
|
|
- <a-input v-model="keyword" placeholder="请输入关键字!"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="8" :sm="24">
|
|
|
- <span class="table-page-search-submitButtons">
|
|
|
- <a-button type="primary" @click="getInfo">查询</a-button>
|
|
|
- <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
|
|
|
- </span>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
+ <div v-show="show">
|
|
|
+ <div>
|
|
|
+ <a-form layout="inline">
|
|
|
+ <a-row >
|
|
|
+ <a-col :md="8" :sm="24">
|
|
|
+ <a-form-item label="关键字">
|
|
|
+ <a-input style="width: 100%" v-model="keyword" placeholder="请输入关键字!"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="8" :sm="24">
|
|
|
+ <a-form-item label="故障类别">
|
|
|
+ <a-select style="width: 200px" v-model="errorTypeId">
|
|
|
+ <a-select-option v-for="item in errorType" :key="item.id" :value="item.id">
|
|
|
+ {{ item.title }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="8" :sm="24">
|
|
|
+ <span class="table-page-search-submitButtons">
|
|
|
+ <a-button type="primary" @click="getInfo">查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
|
|
|
+ </span>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <a-table
|
|
|
+ :columns="columns"
|
|
|
+ :data-source="dataSource"
|
|
|
+ bordered
|
|
|
+ :defaultExpandAllRows="true"
|
|
|
+ >
|
|
|
+ <template v-slot:index="text,record,index">
|
|
|
+ {{ index+1 }}
|
|
|
+ </template>
|
|
|
+ <template v-slot:errorTypeId="text,record">
|
|
|
+ {{ errorType.find(item=>item.id===text).title }}
|
|
|
+ </template>
|
|
|
+ <template v-slot:action="text,record">
|
|
|
+ <a-button type="link" @click="addRepairSchemes(record)"> 获取 </a-button>
|
|
|
+ <a-button type="link" @click="handleViewRepairResolve(record)"> 查看</a-button>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
</div>
|
|
|
- <a-table
|
|
|
- :columns="columns"
|
|
|
- :data-source="dataSource"
|
|
|
- bordered
|
|
|
- :defaultExpandAllRows="true"
|
|
|
- >
|
|
|
- <template v-slot:index="text,record,index">
|
|
|
- {{ index+1 }}
|
|
|
- </template>
|
|
|
- <template v-slot:action="text,record">
|
|
|
- <a-button type="link" @click="addRepairSchemes(record)"> 获取 </a-button>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
+ <resolve-detail ref="resolveDetail" @ok="handleOk"/>
|
|
|
</a-modal>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getRepairSchemePage, addRepairSchemes } from '@/api/repair/repair'
|
|
|
+import { getRepairSchemePage, addRepairSchemes, getRepairType, fetchRepairScheme } from '@/api/repair/repair'
|
|
|
+import ResolveDetail from '@/views/repair/repair/modules/Detail'
|
|
|
|
|
|
export default {
|
|
|
name: 'LongYanSelectSpareForm',
|
|
@@ -49,9 +66,12 @@ export default {
|
|
|
return {
|
|
|
model: null,
|
|
|
visible: false,
|
|
|
+ show: true,
|
|
|
confirmLoading: false,
|
|
|
keyword: '',
|
|
|
+ errorTypeId: '',
|
|
|
dataSource: [],
|
|
|
+ errorType: [],
|
|
|
columns: [
|
|
|
{
|
|
|
title: '序号',
|
|
@@ -61,31 +81,33 @@ export default {
|
|
|
scopedSlots: { customRender: 'index' }
|
|
|
},
|
|
|
{
|
|
|
- title: '维修建议',
|
|
|
- width: 100,
|
|
|
- dataIndex: 'opinion'
|
|
|
+ title: '故障描述',
|
|
|
+ width: 150,
|
|
|
+ dataIndex: 'errorContent'
|
|
|
},
|
|
|
{
|
|
|
- title: '方案提供者',
|
|
|
- dataIndex: 'createdUserName',
|
|
|
- width: 120
|
|
|
+ title: '方案描述',
|
|
|
+ dataIndex: 'opinion',
|
|
|
+ width: 150
|
|
|
},
|
|
|
{
|
|
|
- title: '方案提供时间',
|
|
|
- dataIndex: 'createdTime',
|
|
|
- width: 150
|
|
|
+ title: '故障类别',
|
|
|
+ dataIndex: 'errorTypeId',
|
|
|
+ width: 100,
|
|
|
+ scopedSlots: { customRender: 'errorTypeId' }
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
key: 'action',
|
|
|
align: 'center',
|
|
|
- width: 150,
|
|
|
+ width: 100,
|
|
|
scopedSlots: { customRender: 'action' }
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
+ ResolveDetail
|
|
|
},
|
|
|
props: {
|
|
|
},
|
|
@@ -94,6 +116,9 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
base (record) {
|
|
|
+ getRepairType().then(res => {
|
|
|
+ this.errorType = res.data
|
|
|
+ })
|
|
|
this.visible = true
|
|
|
this.model = record
|
|
|
console.log(record)
|
|
@@ -102,6 +127,7 @@ export default {
|
|
|
getInfo () {
|
|
|
getRepairSchemePage({
|
|
|
keyword: this.keyword,
|
|
|
+ errorTypeId: this.errorTypeId,
|
|
|
dataScope: {
|
|
|
sortBy: 'desc',
|
|
|
sortName: 'created_time'
|
|
@@ -112,8 +138,16 @@ export default {
|
|
|
},
|
|
|
resetSearchForm () {
|
|
|
this.keyword = ''
|
|
|
+ this.errorTypeId = ''
|
|
|
this.getInfo()
|
|
|
},
|
|
|
+ handleViewRepairResolve (record) {
|
|
|
+ this.show = false
|
|
|
+ fetchRepairScheme({ id: record.id }).then(res => {
|
|
|
+ const modal = this.$refs.resolveDetail
|
|
|
+ modal.base(res.data)
|
|
|
+ })
|
|
|
+ },
|
|
|
addRepairSchemes (val) {
|
|
|
addRepairSchemes({
|
|
|
id: val.id,
|
|
@@ -123,9 +157,14 @@ export default {
|
|
|
this.handleCancel()
|
|
|
})
|
|
|
},
|
|
|
+ handleOk () {
|
|
|
+ this.show = true
|
|
|
+ },
|
|
|
handleCancel () {
|
|
|
this.visible = false
|
|
|
this.confirmLoading = false
|
|
|
+ this.keyword = ''
|
|
|
+ this.errorTypeId = ''
|
|
|
this.$emit('ok')
|
|
|
}
|
|
|
}
|