|
|
@@ -31,7 +31,6 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
<el-form-item label="计划日期">
|
|
|
<el-date-picker
|
|
|
style="width: 300px"
|
|
|
@@ -79,14 +78,14 @@
|
|
|
icon="el-icon-search"
|
|
|
size="mini"
|
|
|
@click="handleQuery"
|
|
|
- >搜索
|
|
|
+ >搜索
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
v-no-more-click
|
|
|
icon="el-icon-refresh"
|
|
|
size="mini"
|
|
|
@click="resetQuery"
|
|
|
- >重置
|
|
|
+ >重置
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
@@ -101,7 +100,7 @@
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['iscs:plan:add']"
|
|
|
- >新增
|
|
|
+ >新增
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="1.5">-->
|
|
|
@@ -137,7 +136,11 @@
|
|
|
<el-table-column label="巡检物资柜" align="center" prop="cabinetName">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tooltip :content="scope.row.cabinetName" placement="top">
|
|
|
- <span style="color:#1890ff;cursor: pointer" @click="PlanDetail(scope.row)">{{ getDisplayText(scope.row.cabinetName) }}</span>
|
|
|
+ <span
|
|
|
+ style="color: #1890ff; cursor: pointer"
|
|
|
+ @click="PlanDetail(scope.row)"
|
|
|
+ >{{ getDisplayText(scope.row.cabinetName) }}</span
|
|
|
+ >
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -171,14 +174,14 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
- :disabled="scope.row.status=='1'"
|
|
|
+ :disabled="scope.row.status == '1'"
|
|
|
v-no-more-click
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['iscs:plan:query']"
|
|
|
- >编辑
|
|
|
+ >编辑
|
|
|
</el-button>
|
|
|
|
|
|
<el-button
|
|
|
@@ -188,7 +191,7 @@
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['iscs:plan:remove']"
|
|
|
- >删除
|
|
|
+ >删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -208,7 +211,7 @@
|
|
|
</div>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
|
|
<el-form-item label="计划名称" prop="planName">
|
|
|
- <el-input v-model="form.planName" placeholder="请输入计划名称"/>
|
|
|
+ <el-input v-model="form.planName" placeholder="请输入计划名称" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="计划日期" prop="planDate">
|
|
|
<el-date-picker
|
|
|
@@ -221,12 +224,15 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="所属区域" prop="workstationId">
|
|
|
- <treeselect style="width: 348px" v-model="form.workstationId" :options="workstationOption"
|
|
|
- :normalizer="normalizer" placeholder="选择所属区域"
|
|
|
+ <treeselect
|
|
|
+ style="width: 348px"
|
|
|
+ v-model="form.workstationId"
|
|
|
+ :options="workstationOption"
|
|
|
+ :normalizer="normalizer"
|
|
|
+ placeholder="选择所属区域"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="检查物资柜" prop="cabinetIds">
|
|
|
-
|
|
|
<el-select
|
|
|
:disabled="visibleSelect"
|
|
|
style="width: 348px"
|
|
|
@@ -258,23 +264,22 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button v-no-more-click type="primary" @click="submitForm"
|
|
|
- >确 定
|
|
|
+ >确 定
|
|
|
</el-button>
|
|
|
<el-button v-no-more-click @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
-<!-- 签名弹窗-->
|
|
|
+ <!-- 签名弹窗-->
|
|
|
<el-dialog :visible.sync="openTable" width="800px" append-to-body>
|
|
|
<div slot="title" class="dialog-title">
|
|
|
<i></i>
|
|
|
<span class="title">巡检物资柜详情</span>
|
|
|
</div>
|
|
|
- <el-table v-loading="loading" :data="PlanDetailTableList">
|
|
|
+ <el-table v-loading="loading" :data="PlanDetailTableList">
|
|
|
<el-table-column label="计划名称" align="center" prop="planName">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="巡检物资柜" align="center" prop="cabinetName">
|
|
|
@@ -286,7 +291,7 @@
|
|
|
style="width: 50px; height: 50px"
|
|
|
:preview-teleported="true"
|
|
|
class="images"
|
|
|
- :hide-on-click-modal=true
|
|
|
+ :hide-on-click-modal="true"
|
|
|
:src="scope.row.signatureImg"
|
|
|
:zoom-rate="1.2"
|
|
|
:preview-src-list="[scope.row.signatureImg]"
|
|
|
@@ -301,7 +306,9 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="left" prop="">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" @click="PlanDialogDetail(scope.row)">详情</el-button>
|
|
|
+ <el-button type="text" @click="PlanDialogDetail(scope.row)"
|
|
|
+ >详情</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -309,14 +316,19 @@
|
|
|
<el-button v-no-more-click @click="cancel">关 闭</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
-<!-- 签名详情弹窗-->
|
|
|
+ <!-- 签名详情弹窗-->
|
|
|
<el-dialog :visible.sync="openRecord" width="1500px" append-to-body>
|
|
|
<div slot="title" class="dialog-title">
|
|
|
<i></i>
|
|
|
<span class="title">巡检物资柜检查记录</span>
|
|
|
</div>
|
|
|
- <el-table v-loading="loading" :data="RecordList">
|
|
|
- <el-table-column label="计划名称" align="center" prop="planName" width="200">
|
|
|
+ <el-table v-loading="loading" :data="RecordList">
|
|
|
+ <el-table-column
|
|
|
+ label="计划名称"
|
|
|
+ align="center"
|
|
|
+ prop="planName"
|
|
|
+ width="200"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.planName }}
|
|
|
</template>
|
|
|
@@ -325,8 +337,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="物资编号" align="center" prop="materialsId">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="物资名称" align="center" prop="materialsName"/>
|
|
|
- <el-table-column label="物资类型" align="center" prop="materialsTypeName"/>
|
|
|
+ <el-table-column label="物资名称" align="center" prop="materialsName" />
|
|
|
+ <el-table-column
|
|
|
+ label="物资类型"
|
|
|
+ align="center"
|
|
|
+ prop="materialsTypeName"
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
label="物资图片"
|
|
|
align="center"
|
|
|
@@ -356,15 +372,20 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" align="center" prop="status">
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.checks_status" :value="scope.row.status"/>
|
|
|
+ <dict-tag
|
|
|
+ :options="dict.type.checks_status"
|
|
|
+ :value="scope.row.status"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="异常原因" align="center" prop="reason">
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.exceptions_status" :value="scope.row.reason"/>
|
|
|
+ <dict-tag
|
|
|
+ :options="dict.type.exceptions_status"
|
|
|
+ :value="scope.row.reason"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
v-show="recordtotal > 0"
|
|
|
@@ -381,33 +402,41 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
import {
|
|
|
listPlan,
|
|
|
addPlan,
|
|
|
deletePlan,
|
|
|
updatePlan,
|
|
|
- selectPlanById, getCheckPlanCabinetList
|
|
|
-} from '@/api/mes/material/plan'
|
|
|
-import Crontab from '@/components/Crontab/index.vue'
|
|
|
-import Treeselect from '@riophae/vue-treeselect'
|
|
|
-import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|
|
-import { listMarsDept } from '@/api/system/marsdept'
|
|
|
-import { getIsMaterialsCabinets, listMaterials } from '@/api/mes/material/information'
|
|
|
-import { listUser } from '@/api/system/user'
|
|
|
-import Template from '@/views/print/printtemplate/list.vue'
|
|
|
-import { listCheckRecord } from '@/api/mes/material/checkRecord'
|
|
|
+ selectPlanById,
|
|
|
+ getCheckPlanCabinetList,
|
|
|
+} from "@/api/mes/material/plan";
|
|
|
+import Crontab from "@/components/Crontab/index.vue";
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
+import { listMarsDept } from "@/api/system/marsdept";
|
|
|
+import {
|
|
|
+ getIsMaterialsCabinets,
|
|
|
+ listMaterials,
|
|
|
+} from "@/api/mes/material/information";
|
|
|
+import { listUser } from "@/api/system/user";
|
|
|
+import Template from "@/views/print/printtemplate/list.vue";
|
|
|
+import { listCheckRecord } from "@/api/mes/material/checkRecord";
|
|
|
|
|
|
export default {
|
|
|
- name: 'Team',
|
|
|
+ name: "Team",
|
|
|
components: { Template, Treeselect, Crontab },
|
|
|
props: {
|
|
|
cabinetId: {
|
|
|
type: String,
|
|
|
- required: false
|
|
|
- }
|
|
|
+ required: false,
|
|
|
+ },
|
|
|
},
|
|
|
- dicts: ['material_status', 'checking_status','checks_status','exceptions_status'],
|
|
|
+ dicts: [
|
|
|
+ "material_status",
|
|
|
+ "checking_status",
|
|
|
+ "checks_status",
|
|
|
+ "exceptions_status",
|
|
|
+ ],
|
|
|
data() {
|
|
|
return {
|
|
|
//自动生成编码
|
|
|
@@ -426,81 +455,79 @@ export default {
|
|
|
showSearch: true,
|
|
|
// 总条数
|
|
|
total: 0,
|
|
|
- recordtotal:0,//签名详情渲染
|
|
|
- recordCurrent:1,//签名列表页面
|
|
|
- recordSize:10,
|
|
|
+ recordtotal: 0, //签名详情渲染
|
|
|
+ recordCurrent: 1, //签名列表页面
|
|
|
+ recordSize: 10,
|
|
|
// 班组表格数据
|
|
|
PlanList: [],
|
|
|
- PlanDetailTableList:[],
|
|
|
+ PlanDetailTableList: [],
|
|
|
// 检查记录表格数据
|
|
|
RecordList: [],
|
|
|
// 弹出层标题
|
|
|
- title: '',
|
|
|
+ title: "",
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
- openTable:false,//巡检物资柜详情
|
|
|
- openRecord:false,//签名弹框详情再打开
|
|
|
- RecordselectedRow:null,//保证签名详情列表分页切换查询数据还在
|
|
|
+ openTable: false, //巡检物资柜详情
|
|
|
+ openRecord: false, //签名弹框详情再打开
|
|
|
+ RecordselectedRow: null, //保证签名详情列表分页切换查询数据还在
|
|
|
// 查询参数
|
|
|
- createTime: '',
|
|
|
+ createTime: "",
|
|
|
queryParams: {
|
|
|
current: 1,
|
|
|
size: 10,
|
|
|
- checkUserName: '',
|
|
|
- planName: '',
|
|
|
- cabinetId: '',
|
|
|
+ checkUserName: "",
|
|
|
+ planName: "",
|
|
|
+ cabinetId: "",
|
|
|
startTime: null,
|
|
|
endTime: null,
|
|
|
- status: ''
|
|
|
+ status: "",
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {
|
|
|
- cabinetIds: ''
|
|
|
+ cabinetIds: "",
|
|
|
},
|
|
|
cabinets: [], //物资所属柜
|
|
|
planPersonOption: [], // 检查人员
|
|
|
- workstationOption: [],//所属岗位
|
|
|
+ workstationOption: [], //所属岗位
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
userIdStr: [
|
|
|
- { required: true, message: '人员不能为空', trigger: 'blur' }
|
|
|
+ { required: true, message: "人员不能为空", trigger: "blur" },
|
|
|
],
|
|
|
checkName: [
|
|
|
- { required: true, message: '任务名称不能为空', trigger: 'blur' }
|
|
|
- ]
|
|
|
-
|
|
|
+ { required: true, message: "任务名称不能为空", trigger: "blur" },
|
|
|
+ ],
|
|
|
},
|
|
|
pickerOptions: {
|
|
|
-
|
|
|
shortcuts: [
|
|
|
{
|
|
|
- text: '最近一周',
|
|
|
+ text: "最近一周",
|
|
|
onClick(picker) {
|
|
|
- const end = new Date()
|
|
|
- const start = new Date()
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
|
|
- picker.$emit('pick', [start, end])
|
|
|
- }
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
+ picker.$emit("pick", [start, end]);
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- text: '最近一个月',
|
|
|
+ text: "最近一个月",
|
|
|
onClick(picker) {
|
|
|
- const end = new Date()
|
|
|
- const start = new Date()
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
|
|
- picker.$emit('pick', [start, end])
|
|
|
- }
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
+ picker.$emit("pick", [start, end]);
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- text: '最近三个月',
|
|
|
+ text: "最近三个月",
|
|
|
onClick(picker) {
|
|
|
- const end = new Date()
|
|
|
- const start = new Date()
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
|
|
- picker.$emit('pick', [start, end])
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
+ picker.$emit("pick", [start, end]);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
FormpickerOptions: {
|
|
|
disabledDate(time) {
|
|
|
@@ -508,175 +535,178 @@ export default {
|
|
|
},
|
|
|
shortcuts: [
|
|
|
{
|
|
|
- text: '最近一周',
|
|
|
+ text: "最近一周",
|
|
|
onClick(picker) {
|
|
|
- const end = new Date()
|
|
|
- const start = new Date()
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
|
|
- picker.$emit('pick', [start, end])
|
|
|
- }
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
+ picker.$emit("pick", [start, end]);
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- text: '最近一个月',
|
|
|
+ text: "最近一个月",
|
|
|
onClick(picker) {
|
|
|
- const end = new Date()
|
|
|
- const start = new Date()
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
|
|
- picker.$emit('pick', [start, end])
|
|
|
- }
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
+ picker.$emit("pick", [start, end]);
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- text: '最近三个月',
|
|
|
+ text: "最近三个月",
|
|
|
onClick(picker) {
|
|
|
- const end = new Date()
|
|
|
- const start = new Date()
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
|
|
- picker.$emit('pick', [start, end])
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
+ picker.$emit("pick", [start, end]);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
- visibleSelect: false//控制查询
|
|
|
- }
|
|
|
+ visibleSelect: false, //控制查询
|
|
|
+ };
|
|
|
},
|
|
|
watch: {
|
|
|
- 'form.workstationId': function(newVal, oldVal) {
|
|
|
+ "form.workstationId": function (newVal, oldVal) {
|
|
|
if (newVal) {
|
|
|
- console.log(newVal, 'gangwei ')
|
|
|
+ console.log(newVal, "gangwei ");
|
|
|
const data = {
|
|
|
current: 1,
|
|
|
size: -1,
|
|
|
- workstationId: newVal
|
|
|
- }
|
|
|
+ workstationId: newVal,
|
|
|
+ };
|
|
|
getIsMaterialsCabinets(data).then((response) => {
|
|
|
- console.log(response, 'wgahah')
|
|
|
+ console.log(response, "wgahah");
|
|
|
if (response?.data?.records) {
|
|
|
this.cabinets = response.data.records.map((item) => ({
|
|
|
value: item.cabinetId,
|
|
|
- label: item.cabinetName
|
|
|
- }))
|
|
|
+ label: item.cabinetName,
|
|
|
+ }));
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
- this.queryParams.cabinetId = this.cabinetId || null
|
|
|
+ this.queryParams.cabinetId = this.cabinetId || null;
|
|
|
if (this.cabinetId) {
|
|
|
- this.visibleSelect = true
|
|
|
+ this.visibleSelect = true;
|
|
|
}
|
|
|
- this.getList()
|
|
|
- this.getOtherList()
|
|
|
+ this.getList();
|
|
|
+ this.getOtherList();
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
-// 格式化日期查询数据
|
|
|
+ // 格式化日期查询数据
|
|
|
formatDate(date) {
|
|
|
- const year = date.getFullYear().toString().padStart(2, '0')
|
|
|
- const month = (date.getMonth() + 1).toString().padStart(2, '0')
|
|
|
- const day = date.getDate().toString().padStart(2, '0')
|
|
|
- const hours = date.getHours().toString().padStart(2, '0')
|
|
|
- const minutes = date.getMinutes().toString().padStart(2, '0')
|
|
|
- const seconds = date.getSeconds().toString().padStart(2, '0')
|
|
|
-
|
|
|
- return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
|
|
|
+ const year = date.getFullYear().toString().padStart(2, "0");
|
|
|
+ const month = (date.getMonth() + 1).toString().padStart(2, "0");
|
|
|
+ const day = date.getDate().toString().padStart(2, "0");
|
|
|
+ const hours = date.getHours().toString().padStart(2, "0");
|
|
|
+ const minutes = date.getMinutes().toString().padStart(2, "0");
|
|
|
+ const seconds = date.getSeconds().toString().padStart(2, "0");
|
|
|
+
|
|
|
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
|
},
|
|
|
/** 查询物资信息列表 */
|
|
|
getList() {
|
|
|
- this.loading = true
|
|
|
+ this.loading = true;
|
|
|
// 格式化日期并更新 queryParams
|
|
|
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])
|
|
|
+ this.queryParams.startTime = this.formatDate(this.createTime[0]);
|
|
|
+ this.queryParams.endTime = this.formatDate(this.createTime[1]);
|
|
|
}
|
|
|
listPlan(this.queryParams).then((response) => {
|
|
|
- console.log(response, '获取物资信息allList ')
|
|
|
- this.PlanList = response.data.records
|
|
|
- this.total = response.data.total
|
|
|
+ console.log(response, "获取物资信息allList ");
|
|
|
+ this.PlanList = response.data.records;
|
|
|
+ this.total = response.data.total;
|
|
|
this.machinerytypeList = this.handleTree(
|
|
|
response.data.records,
|
|
|
- 'materialsTypeId',
|
|
|
- 'parentId',
|
|
|
- 'children'
|
|
|
- )
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
- ;
|
|
|
+ "materialsTypeId",
|
|
|
+ "parentId",
|
|
|
+ "children"
|
|
|
+ );
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
getOtherList() {
|
|
|
const data = {
|
|
|
current: 1,
|
|
|
- size: -1
|
|
|
- }
|
|
|
+ size: -1,
|
|
|
+ };
|
|
|
getIsMaterialsCabinets(data).then((response) => {
|
|
|
if (response?.data?.records) {
|
|
|
this.cabinets = response.data.records.map((item) => ({
|
|
|
value: item.cabinetId,
|
|
|
- label: item.cabinetName
|
|
|
- }))
|
|
|
+ label: item.cabinetName,
|
|
|
+ }));
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
const data1 = {
|
|
|
pageSize: 999999999,
|
|
|
pageNum: 1,
|
|
|
- roleId:12
|
|
|
- }
|
|
|
+ roleId: 12,
|
|
|
+ };
|
|
|
listUser(data1).then((res) => {
|
|
|
this.planPersonOption = res.rows.map((item) => {
|
|
|
return {
|
|
|
label: item.nickName,
|
|
|
- value: item.userId
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- listMarsDept(data).then(res => {
|
|
|
+ value: item.userId,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ });
|
|
|
+ listMarsDept(data).then((res) => {
|
|
|
const data = res.data.records.filter((item) => {
|
|
|
- return item.parentId == '0'
|
|
|
- })
|
|
|
- this.workstationOption = this.handleTree(data, 'workstationId', 'parentId')
|
|
|
- })
|
|
|
+ return item.parentId == "0";
|
|
|
+ });
|
|
|
+ this.workstationOption = this.handleTree(
|
|
|
+ data,
|
|
|
+ "workstationId",
|
|
|
+ "parentId"
|
|
|
+ );
|
|
|
+ });
|
|
|
},
|
|
|
normalizer(node) {
|
|
|
if (node.children && !node.children.length) {
|
|
|
- delete node.children
|
|
|
+ delete node.children;
|
|
|
}
|
|
|
return {
|
|
|
id: node.workstationId,
|
|
|
label: node.workstationName,
|
|
|
- children: node.children
|
|
|
- }
|
|
|
+ children: node.children,
|
|
|
+ };
|
|
|
},
|
|
|
/* 物资柜信息转换展示 */
|
|
|
getDisplayText(cabinetName) {
|
|
|
- const names = cabinetName.split(',')
|
|
|
+ const names = cabinetName.split(",");
|
|
|
if (names.length == 1) {
|
|
|
// return `${names.length}个 (${names[0]})`
|
|
|
- return `${names.length}个`
|
|
|
+ return `${names.length}个`;
|
|
|
}
|
|
|
if (names.length > 1) {
|
|
|
// return `${names.length}个 (${names[0]}...)`
|
|
|
- return `${names.length}个`
|
|
|
+ return `${names.length}个`;
|
|
|
}
|
|
|
- return names[0]
|
|
|
+ return names[0];
|
|
|
},
|
|
|
// 巡检物资柜 点击事件
|
|
|
- PlanDetail(row){
|
|
|
- console.log(row,'签名分页')
|
|
|
- this.openTable=true
|
|
|
- const data={
|
|
|
- planId:row.planId,
|
|
|
+ PlanDetail(row) {
|
|
|
+ console.log(row, "签名分页");
|
|
|
+ this.openTable = true;
|
|
|
+ const data = {
|
|
|
+ planId: row.planId,
|
|
|
pageSize: 999999999,
|
|
|
pageNum: 1,
|
|
|
- }
|
|
|
+ };
|
|
|
getCheckPlanCabinetList(data).then((response) => {
|
|
|
- console.log(response,'物资柜 签名分页')
|
|
|
- this.PlanDetailTableList=response.data
|
|
|
- })
|
|
|
+ console.log(response, "物资柜 签名分页");
|
|
|
+ this.PlanDetailTableList = response.data;
|
|
|
+ });
|
|
|
},
|
|
|
// 签名弹窗内部详情查看
|
|
|
- PlanDialogDetail(row){
|
|
|
- this.openRecord=true
|
|
|
+ PlanDialogDetail(row) {
|
|
|
+ this.openRecord = true;
|
|
|
this.RecordselectedRow = row || this.RecordselectedRow;
|
|
|
const data = {
|
|
|
planId: this.RecordselectedRow.planId,
|
|
|
@@ -685,156 +715,153 @@ export default {
|
|
|
size: this.recordSize,
|
|
|
};
|
|
|
listCheckRecord(data).then((response) => {
|
|
|
- console.log(response, 'response')
|
|
|
- this.RecordList = response.data.records
|
|
|
- this.recordtotal = response.data.total
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
+ console.log(response, "response");
|
|
|
+ this.RecordList = response.data.records;
|
|
|
+ this.recordtotal = response.data.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
goto(row) {
|
|
|
- console.log(row, 'goto检查计划查看')
|
|
|
+ console.log(row, "goto检查计划查看");
|
|
|
if (this.cabinetId) {
|
|
|
- this.$emit('planId', {
|
|
|
+ this.$emit("planId", {
|
|
|
planId: row.planId,
|
|
|
- planName: row.planName
|
|
|
- })
|
|
|
+ planName: row.planName,
|
|
|
+ });
|
|
|
} else {
|
|
|
this.$router.push({
|
|
|
- path: '/material/Inspectionrecords',
|
|
|
+ path: "/material/Inspectionrecords",
|
|
|
query: {
|
|
|
planId: row.planId,
|
|
|
- planName: row.planName
|
|
|
- }
|
|
|
- })
|
|
|
+ planName: row.planName,
|
|
|
+ },
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
- this.reset()
|
|
|
- this.open = true
|
|
|
- this.form.workstationId = null
|
|
|
- this.title = '新增检查计划'
|
|
|
- this.optType = 'add'
|
|
|
+ this.reset();
|
|
|
+ this.open = true;
|
|
|
+ this.form.workstationId = null;
|
|
|
+ this.title = "新增检查计划";
|
|
|
+ this.optType = "add";
|
|
|
if (this.visibleSelect) {
|
|
|
- this.form.cabinetIds = [this.cabinetId]
|
|
|
+ this.form.cabinetIds = [this.cabinetId];
|
|
|
}
|
|
|
- this.form.planName=`物资检查计划${this.formatELTime(new Date())}`
|
|
|
+ this.form.planName = `物资检查计划${this.formatELTime(new Date())}`;
|
|
|
},
|
|
|
|
|
|
formatELTime(date) {
|
|
|
- if (!date) return ''
|
|
|
- const d = new Date(date)
|
|
|
- let month = '' + (d.getMonth() + 1),
|
|
|
- day = '' + d.getDate(),
|
|
|
- year = d.getFullYear()
|
|
|
+ if (!date) return "";
|
|
|
+ const d = new Date(date);
|
|
|
+ let month = "" + (d.getMonth() + 1),
|
|
|
+ day = "" + d.getDate(),
|
|
|
+ year = d.getFullYear();
|
|
|
|
|
|
- if (month.length < 2) month = '0' + month
|
|
|
- if (day.length < 2) day = '0' + day
|
|
|
+ if (month.length < 2) month = "0" + month;
|
|
|
+ if (day.length < 2) day = "0" + day;
|
|
|
|
|
|
- return [year, month, day].join('-')
|
|
|
+ return [year, month, day].join("-");
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
- this.reset()
|
|
|
+ this.reset();
|
|
|
selectPlanById(row.planId).then((response) => {
|
|
|
- this.form = response.data
|
|
|
- this.open = true
|
|
|
- this.title = '编辑检查计划'
|
|
|
- this.optType = 'edit'
|
|
|
- })
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "编辑检查计划";
|
|
|
+ this.optType = "edit";
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs['form'].validate((valid) => {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.form.planId != null) {
|
|
|
- this.form.planDate = this.formatELTime(this.form.planDate)
|
|
|
+ this.form.planDate = this.formatELTime(this.form.planDate);
|
|
|
updatePlan(this.form).then((response) => {
|
|
|
- console.log(response, '修改返回')
|
|
|
- this.$modal.msgSuccess('修改成功')
|
|
|
- this.open = false
|
|
|
- this.getList()
|
|
|
- })
|
|
|
+ console.log(response, "修改返回");
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
} else {
|
|
|
- this.form.planDate = this.formatELTime(this.form.planDate)
|
|
|
+ this.form.planDate = this.formatELTime(this.form.planDate);
|
|
|
addPlan(this.form).then((response) => {
|
|
|
- console.log(response, '新增返回')
|
|
|
- this.$modal.msgSuccess('新增成功')
|
|
|
- this.open = false
|
|
|
- this.getList()
|
|
|
- })
|
|
|
+ console.log(response, "新增返回");
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
- this.open = false
|
|
|
- this.openTable = false
|
|
|
+ this.open = false;
|
|
|
+ this.openTable = false;
|
|
|
|
|
|
- this.reset()
|
|
|
+ this.reset();
|
|
|
},
|
|
|
- cancelDetail(){
|
|
|
- this.openRecord=false
|
|
|
+ cancelDetail() {
|
|
|
+ this.openRecord = false;
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
|
- planName: '',
|
|
|
- cabinetIds: '',
|
|
|
- workstationId: '',
|
|
|
- checkUserName: ''
|
|
|
- }
|
|
|
- this.resetForm('form')
|
|
|
- this.autoGenFlag = false
|
|
|
+ planName: "",
|
|
|
+ cabinetIds: "",
|
|
|
+ workstationId: "",
|
|
|
+ checkUserName: "",
|
|
|
+ };
|
|
|
+ this.resetForm("form");
|
|
|
+ this.autoGenFlag = false;
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.current = 1
|
|
|
- this.getList()
|
|
|
+ this.queryParams.current = 1;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
- this.resetForm('queryForm')
|
|
|
- this.queryParams.startTime = ''
|
|
|
- this.queryParams.endTime = ''
|
|
|
- this.createTime = ''
|
|
|
- this.handleQuery()
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.queryParams.startTime = "";
|
|
|
+ this.queryParams.endTime = "";
|
|
|
+ this.createTime = "";
|
|
|
+ this.handleQuery();
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map((item) => item.planId)
|
|
|
- this.single = selection.length !== 1
|
|
|
- this.multiple = !selection.length
|
|
|
+ this.ids = selection.map((item) => item.planId);
|
|
|
+ this.single = selection.length !== 1;
|
|
|
+ this.multiple = !selection.length;
|
|
|
},
|
|
|
|
|
|
-
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const checkIds = row.planId || this.ids
|
|
|
+ const checkIds = row.planId || this.ids;
|
|
|
this.$modal
|
|
|
.confirm('是否确认删除编号为"' + checkIds + '"的数据项?')
|
|
|
- .then(function() {
|
|
|
- return deletePlan(checkIds)
|
|
|
+ .then(function () {
|
|
|
+ return deletePlan(checkIds);
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.getList()
|
|
|
- this.$modal.msgSuccess('删除成功')
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
})
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
- // 计划日期清空
|
|
|
- handleClearTime(value){
|
|
|
- if(value==null){
|
|
|
- this.queryParams.startTime=null
|
|
|
- this.queryParams.endTime=null
|
|
|
+ // 计划日期清空
|
|
|
+ handleClearTime(value) {
|
|
|
+ if (value == null) {
|
|
|
+ this.queryParams.startTime = null;
|
|
|
+ this.queryParams.endTime = null;
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-}
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" src="@/assets/styles/dialog-title.scss" scoped>
|
|
|
</style>
|
|
|
@@ -864,7 +891,7 @@ export default {
|
|
|
left: 40%;
|
|
|
z-index: 100;
|
|
|
color: white;
|
|
|
- pointer-events: none
|
|
|
+ pointer-events: none;
|
|
|
}
|
|
|
}
|
|
|
.img-box1 {
|
|
|
@@ -891,7 +918,7 @@ export default {
|
|
|
left: 40%;
|
|
|
z-index: 100;
|
|
|
color: white;
|
|
|
- pointer-events: none
|
|
|
+ pointer-events: none;
|
|
|
}
|
|
|
}
|
|
|
.el-input-width {
|