|
|
@@ -27,9 +27,9 @@
|
|
|
<el-form-item label="岗位" prop="workstationId" >
|
|
|
<treeselect style="width: 200px" v-model="queryParams.workstationId" :options="deptOptions" :normalizer="normalizer" placeholder="选择岗位"/>
|
|
|
</el-form-item>
|
|
|
-<!-- <el-form-item label="设备/工艺" prop="machineryId" >-->
|
|
|
-<!-- <treeselect style="width: 200px" v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择岗位"/>-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
+ <el-form-item label="设备/工艺" prop="machineryId" >
|
|
|
+ <treeselect style="width: 200px" v-model="queryParams.machineryId" :options="machineryOptions" :normalizer="Machinerynormalizer" placeholder="选择岗位"/>
|
|
|
+ </el-form-item>
|
|
|
<!-- <el-form-item label="状态" prop="calendarType">
|
|
|
<el-select v-model="queryParams.calendarType" placeholder="状态">
|
|
|
<el-option>正常</el-option>
|
|
|
@@ -51,7 +51,7 @@
|
|
|
<!-- </el-form-item>-->
|
|
|
<el-form-item label="能量源" prop="powerType">
|
|
|
<el-select
|
|
|
- style="width: 300px"
|
|
|
+ style="width: 200px"
|
|
|
v-model="queryParams.powerType"
|
|
|
placeholder="请选择能量源"
|
|
|
>
|
|
|
@@ -188,8 +188,8 @@
|
|
|
<!-- </el-table-column>-->
|
|
|
<el-table-column label="岗位" align="center" prop="workstationName" >
|
|
|
</el-table-column>
|
|
|
-<!-- <el-table-column label="设备/工艺" align="center" prop="machineryName" >-->
|
|
|
-<!-- </el-table-column>-->
|
|
|
+ <el-table-column label="设备/工艺" align="center" prop="machineryName" >
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="LOTO站" align="center" prop="lotoName" >
|
|
|
</el-table-column>
|
|
|
<el-table-column label="作用" align="center" prop="remark">
|
|
|
@@ -381,11 +381,11 @@
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="11">
|
|
|
- <el-form-item label="所属电柜" prop="lockTypeName">
|
|
|
+ <el-form-item label="锁定站" prop="lockTypeName">
|
|
|
<el-select
|
|
|
style="width: 300px"
|
|
|
v-model="form.lotoId"
|
|
|
- placeholder="请选择所属电柜"
|
|
|
+ placeholder="请选择锁定站"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="dict in lotoOptions"
|
|
|
@@ -631,6 +631,8 @@ export default {
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
+ //工艺树
|
|
|
+ machineryOptions: [],
|
|
|
LockTypeOptions: [],//锁具机构类型下拉
|
|
|
padLockTypeOptions: [],//挂锁类型下拉
|
|
|
|
|
|
@@ -707,9 +709,20 @@ export default {
|
|
|
// 'children'
|
|
|
// )
|
|
|
// })
|
|
|
+ // 岗位
|
|
|
listMarsDept(data).then(response => {
|
|
|
this.deptOptions = this.handleTree(response.data.records,"workstationId","parentId")
|
|
|
})
|
|
|
+ // 设备/工艺
|
|
|
+ listTechnology(data).then((response) => {
|
|
|
+ const data=response.data.records.filter((item) =>item.machineryType=='工艺')
|
|
|
+ this.machineryOptions = this.handleTree(
|
|
|
+ data,
|
|
|
+ "machineryId",
|
|
|
+ "parentId"
|
|
|
+ );
|
|
|
+
|
|
|
+ });
|
|
|
// 锁具机构类型
|
|
|
listLockType(data).then((response) => {
|
|
|
this.LockTypeOptions = this.handleTree(response.data.records, 'locksetTypeId')
|
|
|
@@ -741,7 +754,16 @@ export default {
|
|
|
children: node.children
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ Machinerynormalizer(node) {
|
|
|
+ if (node.children && !node.children.length) {
|
|
|
+ delete node.children
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ id: node.machineryId,
|
|
|
+ label: node.machineryName,
|
|
|
+ children: node.children
|
|
|
+ }
|
|
|
+ },
|
|
|
normalizerLockset(node) {
|
|
|
if (node.children && !node.children.length) {
|
|
|
delete node.children
|
|
|
@@ -816,7 +838,16 @@ export default {
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
this.queryParams.current = 1
|
|
|
- this.getList()
|
|
|
+ if (Array.isArray(this.createTime) && this.createTime.length === 2) {
|
|
|
+ this.queryParams.startTime = this.formatDate(this.createTime[0])
|
|
|
+ this.queryParams.endTime = this.formatDate(this.createTime[1])
|
|
|
+ }
|
|
|
+ getIsIsolationPointPage(this.queryParams).then((response) => {
|
|
|
+ // console.log(response, "接口返回结果");
|
|
|
+ this.isolationList = response.data.records
|
|
|
+ this.total = response.data.total
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
@@ -824,7 +855,16 @@ export default {
|
|
|
(this.queryParams.startTime = ''),
|
|
|
(this.queryParams.endTime = ''),
|
|
|
this.resetForm('queryForm')
|
|
|
- this.handleQuery()
|
|
|
+ if (Array.isArray(this.createTime) && this.createTime.length === 2) {
|
|
|
+ this.queryParams.startTime = this.formatDate(this.createTime[0])
|
|
|
+ this.queryParams.endTime = this.formatDate(this.createTime[1])
|
|
|
+ }
|
|
|
+ getIsIsolationPointPage(this.queryParams).then((response) => {
|
|
|
+ // console.log(response, "接口返回结果");
|
|
|
+ this.isolationList = response.data.records
|
|
|
+ this.total = response.data.total
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|