|
@@ -69,9 +69,12 @@
|
|
|
<badge :status="DictCache.COLOR.FILL_GATHER_TASK_STATUS[status]" :text="statusMap[status]" />
|
|
|
</span>
|
|
|
<template #name="text,record">
|
|
|
- <span v-if="record.id===nameId"> <a-input style="width:170px" v-model="record.name" /> <a @click="changeName(record.id,record.name)">保存</a></span>
|
|
|
+ <span v-if="record.id===nameId"> <a-input style="width:170px" v-model="record.name" /> <a @click="changeName(record.id,record.name,record.period)">保存</a></span>
|
|
|
<span v-else >{{ text }} <a @click="nameId=record.id">编辑</a></span>
|
|
|
-
|
|
|
+ </template>
|
|
|
+ <template #period="text,record">
|
|
|
+ <span v-if="record.id===periodId"> <a-input style="width:170px" v-model="record.period" /> <a @click="changeName(record.id,record.name,record.period)">保存</a></span>
|
|
|
+ <span v-else >{{ text }} <a @click="periodId=record.id">编辑</a></span>
|
|
|
</template>
|
|
|
<span slot="action" slot-scope="record">
|
|
|
<template>
|
|
@@ -162,6 +165,7 @@ export default {
|
|
|
advanced: false,
|
|
|
visible: true,
|
|
|
nameId: null,
|
|
|
+ periodId: null,
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
status: this.status
|
|
@@ -211,7 +215,8 @@ export default {
|
|
|
{
|
|
|
title: '巡检频次',
|
|
|
width: 120,
|
|
|
- dataIndex: 'period'
|
|
|
+ dataIndex: 'period',
|
|
|
+ scopedSlots: { customRender: 'period' }
|
|
|
},
|
|
|
{
|
|
|
title: '巡检总数量',
|
|
@@ -396,9 +401,11 @@ export default {
|
|
|
handleEnter () {
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- changeName (id, name) {
|
|
|
- updateName({ id, name }).then(res => {
|
|
|
+ changeName (id, name, period) {
|
|
|
+ updateName({ id, name, period }).then(res => {
|
|
|
this.nameId = null
|
|
|
+ this.periodId = null
|
|
|
+
|
|
|
this.$message.info('修改成功!')
|
|
|
})
|
|
|
}
|