Commit f6bb8fc8 authored by 王晓倩's avatar 王晓倩

报警信息生成工单和巡检计划生成工单细节调整

parent c3a6cd4b
......@@ -73,7 +73,7 @@
@click="handleIssue(scope.row)"
v-hasPermi="['workOrder:basicsInfo:add']"
v-if="scope.row.orderId == '' || scope.row.orderId == null"
>下发工单</el-button>
>生成工单</el-button>
<el-button
size="normal"
type="text"
......@@ -108,7 +108,7 @@
<el-input v-model="form.orderName" placeholder="请输入工单名称" />
</el-form-item>
<el-form-item label="指定执行人员" prop="appointInspector">
<el-select v-model="form.appointInspectorName" placeholder="请选择执行人员" clearable size="small" @change="setUserId">
<el-select v-model="form.appointInspector" placeholder="请选择执行人员" clearable size="small" @change="setUserId">
<el-option
v-for="item in inspector"
:key="item.userId"
......@@ -194,6 +194,9 @@ export default {
orderName: [
{ required: true, message: "工单名称不能为空", trigger: "blur" }
],
appointInspector: [
{ required: true, message: "请选择巡检人员", trigger: "blur" }
],
}
};
},
......@@ -268,7 +271,7 @@ export default {
getDeviceAlarm(alarmId).then(response => {
this.form = response.data;
this.open = true;
this.title = "下发工单";
this.title = "填写工单信息";
});
},
/** 提交按钮 */
......@@ -278,7 +281,7 @@ export default {
this.form.resourceId = this.form.alarmId;
this.form.orderType = "3";
addBasicsInfo(this.form).then(response => {
this.msgSuccess("下发工单成功");
this.msgSuccess("生成工单成功");
this.open = false;
this.getList();
});
......
......@@ -104,7 +104,7 @@
@click="handleIssue(scope.row)"
v-hasPermi="['workOrder:basicsInfo:add']"
v-if="scope.row.planStatus == 0"
>下发工单
>生成工单
</el-button>
<el-button
size="normal"
......@@ -145,7 +145,7 @@
<!-- 添加或修改巡检计划对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<div v-if="this.title != '下发工单'">
<div v-if="this.title != '填写工单信息'">
<el-form-item label="巡检计划名称" prop="planName">
<el-input v-model="form.planName" placeholder="请输入巡检计划名称"/>
</el-form-item>
......@@ -184,7 +184,7 @@
<el-input type="textarea" v-model="form.remarks" placeholder="请输入计划描述"/>
</el-form-item>
</div>
<div v-if="this.title == '下发工单'">
<div v-if="this.title == '填写工单信息'">
<el-form-item label="巡检计划名称" prop="plansName">
<font>{{plansName}}</font>
</el-form-item>
......@@ -297,6 +297,9 @@
endTime: [
{ required: true, message: "请选择结束时间", trigger: "blur" }
],
appointInspector: [
{ required: true, message: "请选择巡检人员", trigger: "blur" }
],
}
};
},
......@@ -395,7 +398,7 @@
this.plansName = this.form.planName;
this.form.remarks = "";
this.open = true;
this.title = "下发工单";
this.title = "填写工单信息";
});
},
/** 修改按钮操作 */
......@@ -416,7 +419,7 @@
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if(this.title != "下发工单") {
if(this.title != "填写工单信息") {
// 二维数组转字符串(处理设备级联选项的值)
var arr = this.form.devices;
var arrLen = arr.length;
......@@ -450,11 +453,11 @@
this.open = false;
this.getList();
});
} else if (this.title == "下发工单") {
} else if (this.title == "填写工单信息") {
this.form.resourceId = this.form.planId;
this.form.orderType = "1";
addBasicsInfo(this.form).then(response => {
this.msgSuccess("下发工单成功");
this.msgSuccess("生成工单成功");
this.open = false;
this.getList();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment