|
|
@ -68,7 +68,7 @@ |
|
|
>{{ $t("share.new") }}</el-button |
|
|
>{{ $t("share.new") }}</el-button |
|
|
> |
|
|
> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
|
|
|
|
|
|
<!-- <el-col :span="1.5"> |
|
|
<el-button |
|
|
<el-button |
|
|
type="success" |
|
|
type="success" |
|
|
icon="el-icon-edit" |
|
|
icon="el-icon-edit" |
|
|
@ -77,16 +77,21 @@ |
|
|
@click="handleEdit" |
|
|
@click="handleEdit" |
|
|
>{{ $t("share.edit") }}</el-button |
|
|
>{{ $t("share.edit") }}</el-button |
|
|
> |
|
|
> |
|
|
</el-col> |
|
|
|
|
|
|
|
|
</el-col> --> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
|
<el-button type="danger" icon="el-icon-delete" plain size="mini">{{ |
|
|
<el-button type="danger" icon="el-icon-delete" plain size="mini">{{ |
|
|
$t("share.delete") |
|
|
$t("share.delete") |
|
|
}}</el-button> |
|
|
}}</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
|
<el-button type="warning" icon="el-icon-download" plain size="mini">{{ |
|
|
|
|
|
$t("share.export") |
|
|
|
|
|
}}</el-button> |
|
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
type="warning" |
|
|
|
|
|
icon="el-icon-download" |
|
|
|
|
|
plain |
|
|
|
|
|
size="mini" |
|
|
|
|
|
@click="handleExport" |
|
|
|
|
|
>{{ $t("share.export") }}</el-button |
|
|
|
|
|
> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-table :data="tableData" style="width: 100%; margin-bottom: 20px"> |
|
|
<el-table :data="tableData" style="width: 100%; margin-bottom: 20px"> |
|
|
@ -143,32 +148,37 @@ |
|
|
:total="total" |
|
|
:total="total" |
|
|
:page.sync="queryParams.pageNum" |
|
|
:page.sync="queryParams.pageNum" |
|
|
:limit.sync="queryParams.pageSize" |
|
|
:limit.sync="queryParams.pageSize" |
|
|
|
|
|
@pagination="init" |
|
|
/> |
|
|
/> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
:title="title" |
|
|
:title="title" |
|
|
:visible.sync="dialogVisible" |
|
|
:visible.sync="dialogVisible" |
|
|
width="30%" |
|
|
width="30%" |
|
|
:before-close="handleClose" |
|
|
:before-close="handleClose" |
|
|
|
|
|
ref="ruleForm" |
|
|
> |
|
|
> |
|
|
<el-form v-model="dialogForm" :rules="rules" ref="ruleForm"> |
|
|
|
|
|
|
|
|
<el-form :model="dialogForm" :rules="rules" ref="ruleForm"> |
|
|
<el-form-item :label="$t('patrolpointpreset.ParentPointID')"> |
|
|
<el-form-item :label="$t('patrolpointpreset.ParentPointID')"> |
|
|
<span class="fatherID" @click="fatherIDFn">{{ fatherID }}</span> |
|
|
|
|
|
|
|
|
<span class="fatherID" @click="fatherIDFn">{{ |
|
|
|
|
|
dialogForm.patrolpointId || fatherID |
|
|
|
|
|
}}</span> |
|
|
<i |
|
|
<i |
|
|
class="el-icon-close" |
|
|
class="el-icon-close" |
|
|
style="color: red; cursor: pointer; margin-left: 5px" |
|
|
style="color: red; cursor: pointer; margin-left: 5px" |
|
|
></i> |
|
|
></i> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="$t('patrolpointpreset.ParentPointCode')"> |
|
|
<el-form-item :label="$t('patrolpointpreset.ParentPointCode')"> |
|
|
<span>{{ fatherID }}</span> |
|
|
|
|
|
|
|
|
<span>{{ dialogForm.patrolpointCode }}</span> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="$t('patrolpointpreset.ParentPointName')"> |
|
|
<el-form-item :label="$t('patrolpointpreset.ParentPointName')"> |
|
|
<span>{{ fatherID }}</span> |
|
|
|
|
|
|
|
|
<span>{{ dialogForm.patrolpointName }}</span> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
:label="$t('patrolpointpreset.InspectionEquipmentID')" |
|
|
:label="$t('patrolpointpreset.InspectionEquipmentID')" |
|
|
prop="InspectionEquipmentID" |
|
|
|
|
|
|
|
|
prop="eqpbookId" |
|
|
> |
|
|
> |
|
|
<el-input |
|
|
<el-input |
|
|
|
|
|
v-model="dialogForm.eqpbookId" |
|
|
:placeholder=" |
|
|
:placeholder=" |
|
|
$t('share.PleaseEnter') + |
|
|
$t('share.PleaseEnter') + |
|
|
' ' + |
|
|
' ' + |
|
|
@ -178,6 +188,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="$t('patrolpointpreset.ChannelNumber')"> |
|
|
<el-form-item :label="$t('patrolpointpreset.ChannelNumber')"> |
|
|
<el-input |
|
|
<el-input |
|
|
|
|
|
v-model="dialogForm.channelId" |
|
|
:placeholder=" |
|
|
:placeholder=" |
|
|
$t('share.PleaseEnter') + |
|
|
$t('share.PleaseEnter') + |
|
|
' ' + |
|
|
' ' + |
|
|
@ -187,6 +198,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="$t('patrolpointpreset.PresetPointNumber')"> |
|
|
<el-form-item :label="$t('patrolpointpreset.PresetPointNumber')"> |
|
|
<el-input |
|
|
<el-input |
|
|
|
|
|
v-model="dialogForm.presetCode" |
|
|
:placeholder=" |
|
|
:placeholder=" |
|
|
$t('share.PleaseEnter') + |
|
|
$t('share.PleaseEnter') + |
|
|
' ' + |
|
|
' ' + |
|
|
@ -196,6 +208,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="$t('patrolpointpreset.PresetPointName')"> |
|
|
<el-form-item :label="$t('patrolpointpreset.PresetPointName')"> |
|
|
<el-input |
|
|
<el-input |
|
|
|
|
|
v-model="dialogForm.presetName" |
|
|
:placeholder=" |
|
|
:placeholder=" |
|
|
$t('share.PleaseEnter') + |
|
|
$t('share.PleaseEnter') + |
|
|
' ' + |
|
|
' ' + |
|
|
@ -205,10 +218,8 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button @click="dialogVisible = false">{{ |
|
|
|
|
|
$t("share.cancel") |
|
|
|
|
|
}}</el-button> |
|
|
|
|
|
<el-button type="primary" @click="dialogVisible = false">{{ |
|
|
|
|
|
|
|
|
<el-button @click="handleClose">{{ $t("share.cancel") }}</el-button> |
|
|
|
|
|
<el-button type="primary" @click="submitForm('ruleForm')">{{ |
|
|
$t("share.confirm") |
|
|
$t("share.confirm") |
|
|
}}</el-button> |
|
|
}}</el-button> |
|
|
</span> |
|
|
</span> |
|
|
@ -217,12 +228,13 @@ |
|
|
:title="tableTitle" |
|
|
:title="tableTitle" |
|
|
:visible.sync="tableDialogVisible" |
|
|
:visible.sync="tableDialogVisible" |
|
|
width="60%" |
|
|
width="60%" |
|
|
:before-close="handleClose" |
|
|
|
|
|
|
|
|
:before-close="tableDialogHandleClose" |
|
|
append-to-body |
|
|
append-to-body |
|
|
> |
|
|
> |
|
|
<el-form v-model="dialogForm" :inline="true"> |
|
|
|
|
|
|
|
|
<el-form v-model="tableDialogForm" :inline="true"> |
|
|
<el-form-item :label="$t('patrolpointpreset.PointCode')"> |
|
|
<el-form-item :label="$t('patrolpointpreset.PointCode')"> |
|
|
<el-input |
|
|
<el-input |
|
|
|
|
|
v-model="tableDialogForm.patrolpointCode" |
|
|
:placeholder=" |
|
|
:placeholder=" |
|
|
$t('share.PleaseEnter') + ' ' + $t('patrolpointpreset.PointCode') |
|
|
$t('share.PleaseEnter') + ' ' + $t('patrolpointpreset.PointCode') |
|
|
" |
|
|
" |
|
|
@ -230,6 +242,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="$t('patrolpointpreset.PointName')"> |
|
|
<el-form-item :label="$t('patrolpointpreset.PointName')"> |
|
|
<el-input |
|
|
<el-input |
|
|
|
|
|
v-model="tableDialogForm.patrolpointName" |
|
|
:placeholder=" |
|
|
:placeholder=" |
|
|
$t('share.PleaseEnter') + ' ' + $t('patrolpointpreset.PointName') |
|
|
$t('share.PleaseEnter') + ' ' + $t('patrolpointpreset.PointName') |
|
|
" |
|
|
" |
|
|
@ -239,70 +252,100 @@ |
|
|
<el-button |
|
|
<el-button |
|
|
type="primary" |
|
|
type="primary" |
|
|
icon="el-icon-search" |
|
|
icon="el-icon-search" |
|
|
@click="handleQuery" |
|
|
|
|
|
|
|
|
@click="tableDialogHandleQuery" |
|
|
size="mini" |
|
|
size="mini" |
|
|
>{{ $t("share.search") }}</el-button |
|
|
>{{ $t("share.search") }}</el-button |
|
|
> |
|
|
> |
|
|
<el-button icon="el-icon-refresh" @click="resetQuery" size="mini">{{ |
|
|
|
|
|
$t("share.reset") |
|
|
|
|
|
}}</el-button> |
|
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
icon="el-icon-refresh" |
|
|
|
|
|
@click="tableDialogResetQuery" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
>{{ $t("share.reset") }}</el-button |
|
|
|
|
|
> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-table :data="tableData" style="width: 100%; margin-bottom: 20px"> |
|
|
|
|
|
|
|
|
<el-table |
|
|
|
|
|
:data="dialogTableData" |
|
|
|
|
|
style="width: 100%; margin-bottom: 20px" |
|
|
|
|
|
height="500px" |
|
|
|
|
|
:row-style="rowStyle" |
|
|
|
|
|
@row-click="changeCurrentRow" |
|
|
|
|
|
> |
|
|
<el-table-column type="index" width="55" align="center" /> |
|
|
<el-table-column type="index" width="55" align="center" /> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
:label="$t('patrolpointpreset.PointCode')" |
|
|
:label="$t('patrolpointpreset.PointCode')" |
|
|
prop="name" |
|
|
|
|
|
|
|
|
prop="patrolpointCode" |
|
|
align="center" |
|
|
align="center" |
|
|
/> |
|
|
/> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
:label="$t('patrolpointpreset.PointName')" |
|
|
:label="$t('patrolpointpreset.PointName')" |
|
|
prop="name" |
|
|
|
|
|
|
|
|
prop="patrolpointName" |
|
|
align="center" |
|
|
align="center" |
|
|
/> |
|
|
/> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
:label="$t('patrolpointpreset.IntelligentRecognitionType')" |
|
|
:label="$t('patrolpointpreset.IntelligentRecognitionType')" |
|
|
prop="name" |
|
|
|
|
|
|
|
|
prop="algSubtypeName" |
|
|
align="center" |
|
|
align="center" |
|
|
/> |
|
|
|
|
|
|
|
|
> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ scope.row.algSubtypeName || "无法设置阈值" }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
:label="$t('patrolpointpreset.InspectionContent')" |
|
|
:label="$t('patrolpointpreset.InspectionContent')" |
|
|
prop="name" |
|
|
|
|
|
|
|
|
prop="patrolContent" |
|
|
align="center" |
|
|
align="center" |
|
|
/> |
|
|
/> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
:label="$t('patrolpointpreset.purpose')" |
|
|
:label="$t('patrolpointpreset.purpose')" |
|
|
prop="name" |
|
|
|
|
|
|
|
|
prop="purpose" |
|
|
align="center" |
|
|
align="center" |
|
|
/> |
|
|
/> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<pagination |
|
|
<pagination |
|
|
v-show="total > 0" |
|
|
|
|
|
:total="total" |
|
|
|
|
|
:page.sync="queryParams.pageNum" |
|
|
|
|
|
:limit.sync="queryParams.pageSize" |
|
|
|
|
|
|
|
|
v-show="tableDialogFormTotal > 0" |
|
|
|
|
|
:total="tableDialogFormTotal" |
|
|
|
|
|
:page.sync="tableDialogForm.pageNum" |
|
|
|
|
|
:limit.sync="tableDialogForm.pageSize" |
|
|
|
|
|
@pagination="patrolpointList" |
|
|
/> |
|
|
/> |
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button @click="tableDialogHandleClose()">{{ |
|
|
|
|
|
$t("share.cancel") |
|
|
|
|
|
}}</el-button> |
|
|
|
|
|
<el-button type="primary" @click="tableDialogVisibleBtn()">{{ |
|
|
|
|
|
$t("share.confirm") |
|
|
|
|
|
}}</el-button> |
|
|
|
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
import { |
|
|
|
|
|
getList, |
|
|
|
|
|
patrolpoint_list, |
|
|
|
|
|
postAdd, |
|
|
|
|
|
} from "@/api/basedata/patrolpointmnt/patrolpointpreset"; |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
queryParams: {}, |
|
|
|
|
|
|
|
|
queryParams: { |
|
|
|
|
|
pageNum: 1, |
|
|
|
|
|
pageSize: 10, |
|
|
|
|
|
}, |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
total: 10, |
|
|
total: 10, |
|
|
dialogVisible: false, |
|
|
dialogVisible: false, |
|
|
title: this.$t("patrolpointpreset.AddPresetInspectionPoints"), |
|
|
title: this.$t("patrolpointpreset.AddPresetInspectionPoints"), |
|
|
dialogForm: {}, |
|
|
dialogForm: {}, |
|
|
fatherID: "1111", |
|
|
|
|
|
|
|
|
fatherID: "选择", |
|
|
tableTitle: this.$t( |
|
|
tableTitle: this.$t( |
|
|
"patrolpointpreset.EditInspectionPointPresetPositions" |
|
|
"patrolpointpreset.EditInspectionPointPresetPositions" |
|
|
), |
|
|
), |
|
|
tableDialogVisible: false, |
|
|
tableDialogVisible: false, |
|
|
rules: { |
|
|
rules: { |
|
|
InspectionEquipmentID: [ |
|
|
|
|
|
|
|
|
eqpbookId: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: |
|
|
message: |
|
|
@ -313,15 +356,35 @@ export default { |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
|
|
|
dialogTableData: [], |
|
|
|
|
|
deviceId: null, // 当前点击的行ID |
|
|
|
|
|
deviceItem: null, |
|
|
|
|
|
type: 0, |
|
|
|
|
|
tableDialogForm: { |
|
|
|
|
|
pageNum: 1, |
|
|
|
|
|
pageSize: 10, |
|
|
|
|
|
}, |
|
|
|
|
|
tableDialogFormTotal:10 |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
mounted() {}, |
|
|
|
|
|
|
|
|
mounted() { |
|
|
|
|
|
this.init(); |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
init() { |
|
|
|
|
|
getList(this.queryParams).then((res) => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
this.tableData = res.rows; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
add() { |
|
|
add() { |
|
|
this.dialogVisible = true; |
|
|
this.dialogVisible = true; |
|
|
|
|
|
this.type = 0; |
|
|
this.title = this.$t("patrolpointpreset.AddPresetInspectionPoints"); |
|
|
this.title = this.$t("patrolpointpreset.AddPresetInspectionPoints"); |
|
|
}, |
|
|
}, |
|
|
handleEdit() { |
|
|
handleEdit() { |
|
|
|
|
|
this.type = 1; |
|
|
this.dialogVisible = true; |
|
|
this.dialogVisible = true; |
|
|
this.title = this.$t( |
|
|
this.title = this.$t( |
|
|
"patrolpointpreset.EditInspectionPointPresetPositions" |
|
|
"patrolpointpreset.EditInspectionPointPresetPositions" |
|
|
@ -329,7 +392,80 @@ export default { |
|
|
}, |
|
|
}, |
|
|
fatherIDFn() { |
|
|
fatherIDFn() { |
|
|
this.tableDialogVisible = true; |
|
|
this.tableDialogVisible = true; |
|
|
|
|
|
this.patrolpointList(); |
|
|
|
|
|
}, |
|
|
|
|
|
patrolpointList() { |
|
|
|
|
|
patrolpoint_list(this.tableDialogForm).then((res) => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
this.dialogTableData = res.rows; |
|
|
|
|
|
this.tableDialogFormTotal = res.total; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
tableDialogVisibleBtn() { |
|
|
|
|
|
this.dialogForm = { |
|
|
|
|
|
patrolpointName: this.deviceItem.patrolpointName, |
|
|
|
|
|
patrolpointCode: this.deviceItem.patrolpointCode, |
|
|
|
|
|
patrolpointId: this.deviceItem.patrolpointId, |
|
|
|
|
|
}; |
|
|
|
|
|
this.tableDialogVisible = false; |
|
|
|
|
|
}, |
|
|
|
|
|
rowStyle({ row }) { |
|
|
|
|
|
// return |
|
|
|
|
|
if (this.deviceId === row.deviceId) { |
|
|
|
|
|
return { |
|
|
|
|
|
"background-color": "rgb(94, 180, 251)", |
|
|
|
|
|
}; // 返回选中行的样式 |
|
|
|
|
|
} |
|
|
|
|
|
return {}; |
|
|
|
|
|
}, |
|
|
|
|
|
changeCurrentRow(row) { |
|
|
|
|
|
this.deviceId = row.deviceId; // 更新当前点击的行ID |
|
|
|
|
|
this.deviceItem = row; |
|
|
|
|
|
}, |
|
|
|
|
|
// 新增 |
|
|
|
|
|
submitForm(ruleForm) { |
|
|
|
|
|
this.$refs[ruleForm].validate((v) => { |
|
|
|
|
|
if (v) { |
|
|
|
|
|
console.log(this.dialogForm, 111111111); |
|
|
|
|
|
if (this.type == 0) { |
|
|
|
|
|
postAdd(this.dialogForm).then((res) => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
type: "success", |
|
|
|
|
|
message: "添加成功", |
|
|
|
|
|
}); |
|
|
|
|
|
this.dialogVisible = false; |
|
|
|
|
|
this.init(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
// 修改 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
handleQuery() {}, |
|
|
|
|
|
resetQuery() {}, |
|
|
|
|
|
handleClose() { |
|
|
|
|
|
this.dialogVisible = false; |
|
|
|
|
|
}, |
|
|
|
|
|
tableDialogHandleQuery() { |
|
|
|
|
|
console.log(this.tableDialogForm) |
|
|
|
|
|
this.patrolpointList() |
|
|
|
|
|
// patrolpoint_list(this.tableDialogForm).then((res) => { |
|
|
|
|
|
// if (res.code == 200) { |
|
|
|
|
|
// this.dialogTableData = res.rows; |
|
|
|
|
|
// this.tableDialogFormTotal = res.total; |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
}, |
|
|
|
|
|
tableDialogResetQuery() {}, |
|
|
|
|
|
tableDialogHandleClose() { |
|
|
|
|
|
this.tableDialogVisible = false; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
handleExport() {}, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|