|
|
@ -14,108 +14,177 @@ |
|
|
|
</div> |
|
|
|
<!-- 标题按钮部分结束 --> |
|
|
|
<!-- Start 新增修改部分 --> |
|
|
|
<div class="listconadd"> |
|
|
|
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="right" class="formadd"> |
|
|
|
<div class="wlInfo"><span>工单运维人员情况</span></div> |
|
|
|
<div class="main-content"> |
|
|
|
<div class="searchcon"> |
|
|
|
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="right" class="demo-form-inline"> |
|
|
|
<div class="listtop"> |
|
|
|
<div class="tit">巡视工单信息</div> |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>工单id</span> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>客户标识:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8" class="trightb"> |
|
|
|
<el-form-item prop="orderid"><el-input v-model="formobj.orderid" placeholder="工单id" class="addinputw" clearable /></el-form-item> |
|
|
|
<el-col :span="3" class="trightb"> |
|
|
|
<el-form-item prop="custid"><el-input size="small" v-model="formobj.custid" placeholder="客户标识" class="addinputw" clearable /></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>巡视人名称</span> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>告警设备id:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8" class="trightb"> |
|
|
|
<el-form-item prop="principalname"><el-input v-model="formobj.principalname" placeholder="巡视人名称" class="addinputw" clearable /></el-form-item> |
|
|
|
<el-col :span="3" class="trightb"> |
|
|
|
<el-form-item prop="warneterid"><el-input size="small" v-model="formobj.warneterid" placeholder="工单编号" class="addinputw" clearable /></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>巡视人sid</span> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>告警对象监测点:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8" class="trightb"> |
|
|
|
<el-form-item prop="principalsid"><el-input v-model="formobj.principalsid" placeholder="巡视人sid" class="addinputw" clearable /></el-form-item> |
|
|
|
<el-col :span="3" class="trightb"> |
|
|
|
<el-form-item prop="warnobjectmpsn"><el-input size="small" v-model="formobj.warnobjectmpsn" placeholder="工单名称" class="addinputw" clearable /></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>联系方式</span> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>告警内容:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8" class="trightb"> |
|
|
|
<el-form-item prop="principalcontact"><el-input v-model="formobj.principalcontact" placeholder="联系方式" class="addinputw" clearable /></el-form-item> |
|
|
|
<el-col :span="3" class="trightb"> |
|
|
|
<el-form-item prop="alarmcontent"><el-input size="small" v-model="formobj.alarmcontent" placeholder="工单内容" class="addinputw" clearable /></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>是否负责人</span> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>告警原因:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8" class="trightb"> |
|
|
|
<el-form-item prop="executorname"><el-input v-model="formobj.executorname" placeholder="是否负责人" class="addinputw" clearable /></el-form-item> |
|
|
|
<el-col :span="2" class="trightb"> |
|
|
|
<el-form-item prop="alarmreason"><el-input size="small" v-model="formobj.alarmreason" placeholder="告警原因" class="addinputw" clearable /></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>班组组织。</span> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>处理人:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8" class="trightb"> |
|
|
|
<el-form-item prop="workteam"><el-input v-model="formobj.workteam" placeholder="班组组织。" class="addinputw" clearable /></el-form-item> |
|
|
|
<el-col :span="2" class="trightb"> |
|
|
|
<el-form-item prop="operationuser"><el-input size="small" v-model="formobj.operationuser" placeholder="处理人" class="addinputw" clearable /></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>响应状态(接受、拒绝)</span> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>处理人名称:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8" class="trightb"> |
|
|
|
<el-form-item prop="assignstate"><el-input v-model="formobj.assignstate" placeholder="响应状态(接受、拒绝)" class="addinputw" clearable /></el-form-item> |
|
|
|
<el-col :span="2" class="trightb"> |
|
|
|
<el-form-item prop="operationuserrname"><el-input size="small" v-model="formobj.operationuserrname" placeholder="处理人名称" class="addinputw" clearable /></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>响应时间(接受、拒绝)</span> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>处理说明:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="trightb"> |
|
|
|
<el-form-item prop="operationcontent"><el-input size="small" v-model="formobj.operationcontent" placeholder="处理人名称" class="addinputw" clearable /></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8" class="trightb"> |
|
|
|
<el-form-item prop="assigntime"><el-input v-model="formobj.assigntime" placeholder="响应时间(接受、拒绝)" class="addinputw" clearable /></el-form-item> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>处理时间:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="trightb"> |
|
|
|
<el-form-item prop="operationtime"> |
|
|
|
<el-date-picker v-model="formobj.operationtime" type="date" size="small" clearable value-format="yyyy-MM-dd" placeholder="处理时间" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>首次告警时间:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="trightb"> |
|
|
|
<el-form-item prop="firsttime"> |
|
|
|
<el-date-picker v-model="formobj.firsttime" type="date" size="small" clearable value-format="yyyy-MM-dd" placeholder="首次告警时间" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>最后告警时间:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="trightb"> |
|
|
|
<el-form-item prop="lasttime"> |
|
|
|
<el-date-picker v-model="formobj.lasttime" type="date" size="small" clearable value-format="yyyy-MM-dd" placeholder="最后告警时间" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>告警状态:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2" class="trightb"> |
|
|
|
<el-select |
|
|
|
v-model="formobj.warnlevelkey" |
|
|
|
class="addinputw" |
|
|
|
placeholder="类型" |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="(item, i) in arr" |
|
|
|
:key="i" |
|
|
|
:label="item.type" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>处理状态:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2" class="trightb"> |
|
|
|
<el-select |
|
|
|
v-model="formobj.operationstatus" |
|
|
|
class="addinputw" |
|
|
|
placeholder="等级" |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="(item, i) in arrList" |
|
|
|
:key="i" |
|
|
|
:label="item.type" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<!-- End 添加修改部分 --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import req from '@/api/yxtdispatchcenter/dispatchworker' |
|
|
|
import req from '@/api/yxtdispatchcenter/dispatchorderinfo' |
|
|
|
export default { |
|
|
|
name: 'DispatchWorkerAdd', |
|
|
|
name: 'DispatchOrderinfoAdd', |
|
|
|
data() { |
|
|
|
return { |
|
|
|
submitdisabled: false, |
|
|
|
isSearchShow: true, |
|
|
|
viewTitle: '', |
|
|
|
searchxianshitit: '显示添加条件', |
|
|
|
formobj: { |
|
|
|
id: '', |
|
|
|
sid: '', |
|
|
|
orderid: '', // 工单id |
|
|
|
principalname: '', // 巡视人名称 |
|
|
|
principalsid: '', // 巡视人sid |
|
|
|
principalcontact: '', // 联系方式 |
|
|
|
executorname: '', // 是否负责人 |
|
|
|
workteam: '', // 班组组织。 |
|
|
|
assignstate: '', // 响应状态(接受、拒绝) |
|
|
|
assigntime: '' // 响应时间(接受、拒绝) |
|
|
|
custid: '', // 客户id |
|
|
|
alarmreason: '', // 告警原因 |
|
|
|
warneterid: '', // 告警设备id |
|
|
|
orderno: '', // 工单编号 |
|
|
|
warnobjectmpsn: '', // 工单名称 |
|
|
|
operationuser: '', // 处理人 |
|
|
|
operationuserrname: '', // 处理人名称 |
|
|
|
operationtime: '', // 处理时间 |
|
|
|
operationcontent: '', // 处理说明 |
|
|
|
firsttime: '', // 首次告警时间 |
|
|
|
lasttime: '', // 最后告警时间 |
|
|
|
warnlevelkey: '', // 告警状态 |
|
|
|
operationstatus: '', // 处理状态 |
|
|
|
alarmcontent: '', // 告警内容 |
|
|
|
alarmtypekey: '1', // 告警类型key |
|
|
|
}, |
|
|
|
arr:[{value:1,type:'一级'},{value:2,type:'二级'}], |
|
|
|
arrList:[{value:1,type:'待处理'},{value:2,type:'已处理'},{value:3,type:'处理中'},{value:4,type:'忽略处理'}], |
|
|
|
rules: { |
|
|
|
orderid: [{ required: true, message: '工单id不能为空', trigger: 'blur' }], // 工单id |
|
|
|
principalname: [{ required: true, message: '巡视人名称不能为空', trigger: 'blur' }], // 巡视人名称 |
|
|
|
principalsid: [{ required: true, message: '巡视人sid不能为空', trigger: 'blur' }], // 巡视人sid |
|
|
|
principalcontact: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], // 联系方式 |
|
|
|
executorname: [{ required: true, message: '是否负责人不能为空', trigger: 'blur' }], // 是否负责人 |
|
|
|
workteam: [{ required: true, message: '班组组织。不能为空', trigger: 'blur' }], // 班组组织。 |
|
|
|
assignstate: [{ required: true, message: '响应状态(接受、拒绝)不能为空', trigger: 'blur' }], // 响应状态(接受、拒绝) |
|
|
|
assigntime: [{ required: true, message: '响应时间(接受、拒绝)不能为空', trigger: 'blur' }] // 响应时间(接受、拒绝) |
|
|
|
custid: [{ required: true, message: '客户ID不能为空', trigger: 'blur' }], // 客户ID |
|
|
|
custname: [{ required: true, message: '客户名称不能为空', trigger: 'blur' }], // 客户名称 |
|
|
|
supervisesid: [{ required: true, message: '监管公司id不能为空', trigger: 'blur' }], // 监管公司id |
|
|
|
orderno: [{ required: true, message: '用法说明:工单编号规则。不能为空', trigger: 'blur' }], // 用法说明:工单编号规则。 |
|
|
|
ordername: [{ required: true, message: '工单名称不能为空', trigger: 'blur' }], // 工单名称 |
|
|
|
orderdegree: [{ required: true, message: '描述不能为空', trigger: 'blur' }], // 描述:1-一般;2-重要; 3-紧急;4-督办。 |
|
|
|
ordertype: [{ required: true, message: '描述不能为空', trigger: 'blur' }], // 描述:1-计划巡视; |
|
|
|
ordercontent: [{ required: true, message: '工单内容不能为空', trigger: 'blur' }], // 工单内容 |
|
|
|
// arrivetime: [{ required: true, message: '到达现场时间不能为空', trigger: 'blur' }], // 到达现场时间 |
|
|
|
// planfinishtime: [{ required: true, message: '完成时间不能为空', trigger: 'blur' }], // 完成时间 |
|
|
|
operationcontent: [{ required: true, message: '处理情况不能为空', trigger: 'blur' }], // 处理情况 |
|
|
|
receiveperson: [{ required: true, message: '现场联系人不能为空', trigger: 'blur' }], // 现场联系人 |
|
|
|
receivetel: [{ required: true, message: '现场联系人电话不能为空', trigger: 'blur' }] // 现场联系人电话 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -126,46 +195,66 @@ export default { |
|
|
|
this.formobj.id = '' |
|
|
|
this.formobj.sid = '' // SID |
|
|
|
|
|
|
|
this.orderid = '' // 工单id |
|
|
|
this.principalname = '' // 巡视人名称 |
|
|
|
this.principalsid = '' // 巡视人sid |
|
|
|
this.principalcontact = '' // 联系方式 |
|
|
|
this.executorname = '' // 是否负责人 |
|
|
|
this.workteam = '' // 班组组织。 |
|
|
|
this.assignstate = '' // 响应状态(接受、拒绝) |
|
|
|
this.assigntime = '' // 响应时间(接受、拒绝) |
|
|
|
this.formobj.sid='', |
|
|
|
this.formobj.custid= '', // 客户id |
|
|
|
this.formobj.alarmreason= '', // 告警原因 |
|
|
|
this.formobj.warneterid= '', // 告警设备id |
|
|
|
this.formobj.orderno= '', // 工单编号 |
|
|
|
this.formobj.warnobjectmpsn='', // 工单名称 |
|
|
|
this.formobj.operationuser= '', // 处理人 |
|
|
|
this.formobj.operationuserrname= '', // 处理人名称 |
|
|
|
this.formobj.operationtime= '', // 处理时间 |
|
|
|
this.formobj.operationcontent= '', // 处理说明 |
|
|
|
this.formobj.firsttime= '', // 首次告警时间 |
|
|
|
this.formobj.lasttime='', // 最后告警时间 |
|
|
|
this.formobj.warnlevelkey= '', // 告警状态 |
|
|
|
this.formobj.operationstatus='', // 处理状态 |
|
|
|
this.formobj.alarmcontent= '', // 告警内容 |
|
|
|
this.formobj.alarmtypekey= '', // 告警类型key |
|
|
|
|
|
|
|
this.$refs['form_obj'].resetFields() |
|
|
|
this.$emit('doback') |
|
|
|
}, |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
|
if (this.isSearchShow) { |
|
|
|
this.searchxianshitit = '隐藏添加条件' |
|
|
|
} else { |
|
|
|
this.searchxianshitit = '显示添加条件' |
|
|
|
} |
|
|
|
}, |
|
|
|
showAdd() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['form_obj'].clearValidate() |
|
|
|
}) |
|
|
|
this.viewTitle = '【新增】工单运维人员情况' |
|
|
|
this.viewTitle = '【新增】工单数据' |
|
|
|
}, |
|
|
|
showEdit(row) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['form_obj'].clearValidate() |
|
|
|
}) |
|
|
|
this.viewTitle = '【修改】工单运维人员情况' |
|
|
|
this.searchxianshitit = '显示添加条件' |
|
|
|
this.isSearchShow = true |
|
|
|
this.viewTitle = '【修改】工单数据' |
|
|
|
const _this = this |
|
|
|
req |
|
|
|
.fetchBySid(row.sid) |
|
|
|
.then(resp => { |
|
|
|
if (resp.sucess) { |
|
|
|
if (resp.code==200) { |
|
|
|
const vdata = resp.data |
|
|
|
_this.formobj.id = vdata.id |
|
|
|
_this.formobj.sid = vdata.sid // SID |
|
|
|
|
|
|
|
_this.formobj.orderid = vdata.orderid // 工单id |
|
|
|
_this.formobj.principalname = vdata.principalname // 巡视人名称 |
|
|
|
_this.formobj.principalsid = vdata.principalsid // 巡视人sid |
|
|
|
_this.formobj.principalcontact = vdata.principalcontact // 联系方式 |
|
|
|
_this.formobj.executorname = vdata.executorname // 是否负责人 |
|
|
|
_this.formobj.workteam = vdata.workteam // 班组组织。 |
|
|
|
_this.formobj.assignstate = vdata.assignstate // 响应状态(接受、拒绝) |
|
|
|
_this.formobj.assigntime = vdata.assigntime // 响应时间(接受、拒绝) |
|
|
|
_this.formobj.custid = vdata.custid // 客户ID |
|
|
|
_this.formobj.custname = vdata.custname // 客户名称 |
|
|
|
_this.formobj.supervisesid = vdata.supervisesid // 监管公司id |
|
|
|
_this.formobj.orderno = vdata.orderno // 工单编号 |
|
|
|
_this.formobj.ordername = vdata.ordername // 工单名称 |
|
|
|
_this.formobj.orderdegree = vdata.orderdegree // 描述:1-一般;2-重要; 3-紧急;4-督办。 |
|
|
|
_this.formobj.ordertype = vdata.ordertype // 描述:1-计划巡视; |
|
|
|
_this.formobj.ordercontent = vdata.ordercontent // 工单内容 |
|
|
|
_this.formobj.receiveperson = vdata.receiveperson // 现场联系人 |
|
|
|
_this.formobj.receivetel = vdata.receivetel // 现场联系人电话 |
|
|
|
} else { |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
} |
|
|
@ -180,7 +269,7 @@ export default { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
|
req |
|
|
|
.saveOrUpdate(this.formobj) |
|
|
|
.saveOrUpdates(this.formobj) |
|
|
|
.then(resp => { |
|
|
|
this.submitdisabled = false |
|
|
|
if (resp.success) { |
|
|
@ -197,7 +286,17 @@ export default { |
|
|
|
return false |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
handleSelectionChange(val) { |
|
|
|
this.formobj.workers = val; |
|
|
|
console.log(this.formobj); |
|
|
|
}, |
|
|
|
handleSelection(selection){ |
|
|
|
if (selection.length > 1){ |
|
|
|
let del_row = selection.shift(); |
|
|
|
this.$refs.table.toggleRowSelection(del_row, false) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|