This commit is contained in:
helloDy
2024-02-29 15:54:23 +08:00
parent f8d033c97a
commit 93eb12aeb7
21 changed files with 277 additions and 150 deletions

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-24 20:50:51
* @LastEditTime: 2024-02-29 14:58:37
* @Description:
-->
<template>
@@ -53,6 +53,7 @@
type="datetime"
:placeholder="`请选择计划巡检时间`"
value-format="timestamp"
:default-time="'8:00:00'"
style="width: 100%" />
</el-form-item>
</el-col>
@@ -77,8 +78,8 @@
<el-option
v-for="d in groupOptions"
:key="d.id"
:label="d.name"
:value="d.id" />
:label="d.label"
:value="d.label" />
</el-select>
</el-form-item>
</el-col>
@@ -98,6 +99,7 @@ import basicAdd from '../../../../core/mixins/basic-add';
import { getCheckOrder, getOrderCode, createCheckOrder, updateCheckOrder } from "@/api/equipment/base/inspection/settings";
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
import { getDictDataLabel } from '@/utils/dict';
// import { getEquipmentAll } from '@/api/base/equipment'
export default {
@@ -139,16 +141,48 @@ export default {
}
};
},
created() {
const currenttime = new Date()
this.dataForm.planCheckTime = new Date(currenttime.getFullYear(), currenttime.getMonth(), currenttime.getDate(), 8, 0, 0).getTime()
console.log('11', this.dataForm.planCheckTime, currenttime)
},
mounted() {
this.getDict()
},
methods: {
init(id) {
this.dataForm.id = id || "";
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr()
}
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data
if (response.data.groupClass === '') {
this.dataForm.groupClass = []
} else {
this.dataForm.groupClass = response.data?.groupClass.split(',') || undefined
}
});
} else {
if (this.urlOptions.isGetCode) {
this.getCode()
}
}
});
},
async getDict() {
// 部门列表
const res = await getCoreDepartmentList();
this.departmentOptions = res.data || [];
const res1 = await groupClassesListAll();
this.groupOptions = res1.data || [];
this.groupOptions = res1.data.map((item) => {
item.label = item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict)
return item
}) || [];
// const res = await getEquipmentAll()
// this.eqList = res.data
},