修改工作台样式、状态展示及状态判断字段展示

master
jinna 1 year ago
parent 2246cbe40e
commit 46a02bc3d5
  1. 9
      src/api/device/device.js
  2. 39
      src/api/operation/hand.js
  3. 8
      src/api/workbench/workbench.js
  4. 304
      src/assets/json/status.json
  5. 109
      src/views/businessManagement/ordinary.vue
  6. 441
      src/views/components/requestSub.vue
  7. 42
      src/views/device/deviceSystem.vue
  8. 70
      src/views/operation/hand.vue
  9. 10
      src/views/system/user.vue
  10. 165
      src/views/workbench/index.vue
  11. 6
      src/views/workbench/map.vue

@ -63,4 +63,13 @@ export const importFile = (params) =>{
query:params,
responseType: 'blob'
})
}
// 获取实验室列表
export const getLabList = (query) =>{
return request({
url:"/api/blade-system/dept/assLimsTree",
method:'get',
params:query
})
}

@ -221,4 +221,41 @@ export const serviceInvoice = (data) =>{
method:'post',
data
})
}
}
// 客服提交需求单
export const serviceSave = (data) =>{
return request({
url:'/api/lab-ops/work-order/service-save',
method:'post',
data
})
}
// 客服提交工单保存为草稿
export const serviceDraft = (data) =>{
return request({
url:'/api/lab-ops/work-order/service-draft',
method:'post',
data
})
}
// 客服查询需求单
export const servicePage = (query) =>{
return request({
url:'/api/lab-ops/work-order/service-page',
method:'get',
params:query
})
}
// 获取客服角色下所有实验室账号
export const getAllUser = (query) =>{
return request({
url:"/api/blade-system/user/getLimsUsers",
method:'get',
params:query
})
}

@ -78,4 +78,12 @@ export const faultRatio = (query) =>{
method:'get',
params:query
})
}
export const maintenancePersonnel = (query) =>{
return request({
url:'/api/workBenches/maintenancePersonnel',
method:'get',
params:query
})
}

@ -3,321 +3,431 @@
"1846419477876510721": [
{
"name": "待提报",
"status": -1,
"status": 4,
"color": "#409eff",
"type": ""
},
{
"name": "待提报",
"status": 100,
"color": "#409eff",
"type": ""
},
{
"name": "待提报",
"status": 200,
"color": "#409eff",
"type": ""
},
{
"name": "待接单",
"status": 0,
"status": 101,
"color": "#67c23a",
"type": "success"
},
{
"name": "待接单",
"status": 205,
"color": "#67c23a",
"type": "success"
},
{
"name": "待维修",
"status": 1,
"status": 201,
"color": "#409eff",
"type": ""
},
{
"name": "待维修",
"status": 2,
"status": 401,
"color": "#409eff",
"type": ""
},
{
"name": "待维修",
"status": 3,
"status": 402,
"color": "#409eff",
"type": ""
},
{
"name": "确认方案",
"status": 4,
"status": 301,
"color": "#409eff",
"type": ""
},
{
"name": "维修中",
"status": 5,
"status": 103,
"color": "#e6a23",
"type": "warning"
},
{
"name": "待评价",
"status": 6,
"status": 403,
"color": "#67c23a",
"type": "success"
},
{
"name": "待评价",
"status": 202,
"color": "#67c23a",
"type": "success"
},
{
"name": "待付款",
"status": 7,
"status": 104,
"color": "#67c23a",
"type": "success"
},
{
"name": "已完成",
"status": 8,
"status": 202,
"color": "#909399",
"type": "info"
},
{
"name": "已完成",
"status": 9,
"status": 203,
"color": "#909399",
"type": "info"
},
{
"name": "待维修",
"status": 100,
"color": "#409eff",
"type": ""
"name": "已完成",
"status": 204,
"color": "#909399",
"type": "info"
},
{
"name": "维修中",
"status": 101,
"color": "#e6a23",
"type": "warning"
"name": "已驳回",
"status": 102,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "已驳回",
"status": 102,
"status": 300,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "待评价",
"status": 20,
"color": "#67c23a",
"type": "success"
"name": "已驳回",
"status": 400,
"color": "#f56c6c",
"type": "danger"
}
],
"1123598816738675201": [
"1123598816738675201":[
{
"name": "待提报",
"status": -1,
"status": 100,
"color": "#409eff",
"type": ""
},
{
"name": "待接单",
"status": 0,
"status": 101,
"color": "#67c23a",
"type": "success"
},
{
"name": "待维修",
"status": 1,
"status": 201,
"color": "#409eff",
"type": ""
},
{
"name": "待维修",
"status": 2,
"status": 401,
"color": "#409eff",
"type": ""
},
{
"name": "待维修",
"status": 3,
"status": 402,
"color": "#409eff",
"type": ""
},
{
"name": "确认方案",
"status": 4,
"status": 301,
"color": "#409eff",
"type": ""
},
{
"name": "维修中",
"status": 5,
"status": 103,
"color": "#e6a23",
"type": "warning"
},
{
"name": "待评价",
"status": 6,
"status": 403,
"color": "#67c23a",
"type": "success"
},
{
"name": "待评价",
"status": 202,
"color": "#67c23a",
"type": "success"
},
{
"name": "待付款",
"status": 7,
"status": 104,
"color": "#67c23a",
"type": "success"
},
{
"name": "已完成",
"status": 8,
"status": 202,
"color": "#909399",
"type": "info"
},
{
"name": "已完成",
"status": 203,
"color": "#909399",
"type": "info"
},
{
"name": "已完成",
"status": 9,
"status": 204,
"color": "#909399",
"type": "info"
},
{
"name": "已驳回",
"status": 100,
"status": 102,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "已驳回",
"status": 101,
"status": 300,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "已驳回",
"status": 102,
"status": 400,
"color": "#f56c6c",
"type": "danger"
}
],
"1839536982874193922": [
{
"name": "待提报",
"status": 100,
"color": "#409eff",
"type": ""
},
{
"name": "维修完成",
"status": 20,
"name": "待提报",
"status": 4,
"color": "#409eff",
"type": ""
},
{
"name": "待提报",
"status": 200,
"color": "#409eff",
"type": ""
},
{
"name": "待接单",
"status": 101,
"color": "#67c23a",
"type": "success"
}
],
"1839536982874193922": [
},
{
"name": "待接单",
"status": 0,
"status": 205,
"color": "#67c23a",
"type": "success"
},
{
"name": "待维修",
"status": 1,
"status": 201,
"color": "#409eff",
"type": ""
},
{
"name": "待维修",
"status": 2,
"status": 401,
"color": "#409eff",
"type": ""
},
{
"name": "待维修",
"status": 3,
"status": 402,
"color": "#409eff",
"type": ""
},
{
"name": "待维修",
"status": 4,
"status": 301,
"color": "#409eff",
"type": ""
},
{
"name": "维修中",
"status": 5,
"status": 103,
"color": "#e6a23",
"type": "warning"
},
{
"name": "维修完成",
"status": 6,
"status": 403,
"color": "#67c23a",
"type": "success"
},
{
"name": "维修完成",
"status": 202,
"color": "#67c23a",
"type": "success"
},
{
"name": "待付款",
"status": 7,
"status": 104,
"color": "#67c23a",
"type": "success"
},
{
"name": "已完成",
"status": 8,
"status": 203,
"color": "#909399",
"type": "info"
},
{
"name": "已完成",
"status": 9,
"status": 204,
"color": "#909399",
"type": "info"
},
{
"name": "已驳回",
"status": 100,
"status": 102,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "已驳回",
"status": 101,
"status": 300,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "已驳回",
"status": 102,
"status": 400,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "维修完成",
"status": 20,
"color": "#67c23a",
"type": "success"
}
],
"1839537055389515777": [
{
"name": "",
"status": 4,
"color": "#f56c6c",
"type": ""
},
{
"name": "",
"status": 200,
"color": "#f56c6c",
"type": ""
},
{
"name": "",
"status": 205,
"color": "#f56c6c",
"type": ""
},
{
"name": "已驳回",
"status": 2,
"status": 102,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "已驳回",
"status": 300,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "已驳回",
"status": 400,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "待审批",
"status": 3,
"status": 402,
"color": "#409eff",
"type": ""
},
{
"name": "已通过",
"status": 4,
"status": 301,
"color": "#409eff",
"type": ""
},
{
"name": "维修中",
"status": 5,
"status": 103,
"color": "#e6a23",
"type": "warning"
},
{
"name": "维修完成",
"status": 6,
"status": 403,
"color": "#67c23a",
"type": "success"
},
{
"name": "维修完成",
"status": 202,
"color": "#67c23a",
"type": "success"
},
{
"name": "待付款",
"status": 7,
"status": 104,
"color": "#67c23a",
"type": "success"
},
{
"name": "已完成",
"status": 8,
"status": 203,
"color": "#909399",
"type": "info"
},
{
"name": "已完成",
"status": 9,
"status": 204,
"color": "#909399",
"type": "info"
}
],
"1839552581620793346": [
{
"name": "",
"status": 200,
"color": "#f56c6c",
"type": ""
},
{
"name": "",
"status": 205,
"color": "#f56c6c",
"type": ""
},
{
"name": "待提报",
"status": 4,
"color": "#409eff",
"type": ""
},
{
"name": "已驳回",
@ -338,90 +448,76 @@
"type": "danger"
},
{
"name": "维修完成",
"status": 20,
"color": "#67c23a",
"type": "success"
}
],
"1839552581620793346": [
"name": "已驳回",
"status": 300,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "已驳回",
"status": 0,
"status": 400,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "待确认",
"status": 1,
"status": 201,
"color": "#67c23a",
"type": "success"
},
{
"name": "待提交",
"status": 2,
"status": 401,
"color": "#67c23a",
"type": "success"
},
{
"name": "待审批",
"status": 3,
"status": 402,
"color": "#409eff",
"type": ""
},
{
"name": "待审批",
"status": 4,
"status": 301,
"color": "#409eff",
"type": ""
},
{
"name": "维修中",
"status": 5,
"status": 103,
"color": "#e6a23",
"type": "warning"
},
{
"name": "已完成",
"status": 6,
"status": 403,
"color": "#909399",
"type": "info"
},
{
"name": "已完成",
"status": 7,
"status": 104,
"color": "#909399",
"type": "info"
},
{
"name": "已完成",
"status": 8,
"status": 202,
"color": "#909399",
"type": "info"
},
{
"name": "已完成",
"status": 9,
"status": 203,
"color": "#909399",
"type": "info"
},
{
"name": "已驳回",
"status": 100,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "已驳回",
"status": 101,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "已驳回",
"status": 102,
"color": "#f56c6c",
"type": "danger"
"name": "已完成",
"status": 204,
"color": "#909399",
"type": "info"
}
]
},

@ -29,14 +29,14 @@
</template>
<template slot-scope="{ row }" slot="menu">
<el-button v-show="permission.ordinaryView" @click="handleView(row)">查看</el-button>
<el-button v-show="permission.ordinaryOrder && (row.status == 0 || row.status == 100)" @click="takeOrders(row)">接单</el-button>
<el-button v-show="permission.ordinaryClose && row.status == 0" @click="handleClone(row)">关闭</el-button>
<el-button v-show="permission.ordinaryConfirm && row.status == 1" @click="reciveOrder(row)">确认</el-button>
<el-button v-show="permission.ordinaryRefuse && row.status == 1" @click="repairReject(row)">驳回</el-button>
<el-button v-show="permission.ordinarySubmit && (row.status == 2 || row.status == 101)" @click="handleRepair(row)">提交</el-button>
<el-button v-show="permission.ordinaryFinish && row.status == 5" @click="handleRepairFinish(row)">维修完成</el-button>
<el-button v-show="permission.ordinaryExamine && row.status == 3 || row.status == 102" @click="handleExamine(row)">审批</el-button>
<el-button v-show="row.status == 7" @click="handlePayment(row)">确认付款</el-button>
<el-button v-show="permission.ordinaryOrder && (row.status == 101 || row.status == 400)" @click="takeOrders(row)">接单</el-button>
<el-button v-show="permission.ordinaryClose && row.status == 101" @click="handleClone(row)">关闭</el-button>
<el-button v-show="permission.ordinaryConfirm && row.status == 201" @click="reciveOrder(row)">确认</el-button>
<el-button v-show="permission.ordinaryRefuse && row.status == 201" @click="repairReject(row)">驳回</el-button>
<el-button v-show="permission.ordinarySubmit && (row.status == 401 || row.status == 300)" @click="handleRepair(row)">提交</el-button>
<el-button v-show="permission.ordinaryFinish && row.status == 103" @click="handleRepairFinish(row)">维修完成</el-button>
<el-button v-show="permission.ordinaryExamine && row.status == 402 || row.status == 102" @click="handleExamine(row)">审批</el-button>
<el-button v-show="row.status == 104" @click="handlePayment(row)">确认付款</el-button>
<el-button @click="handleExport(row)">导出</el-button>
</template>
</avue-crud>
@ -186,13 +186,13 @@
<el-input placeholder="请输入备注" v-model="addForm.remark" type="textarea" style="width:98%;"></el-input>
</el-form-item>
</div>
<div v-show="((addForm.repaiRejectReason != '' && addForm.status == 100) || addForm.repaiTeamRejectReason != '' )">
<div v-show="((addForm.repaiRejectReason != '' && addForm.status == 400) || addForm.repaiTeamRejectReason != '' )">
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">驳回详情</div>
<el-form-item label="驳回维修人" prop="repairPersonName" v-show="addForm.repaiRejectReason != '' && addForm.status == 100">
<el-form-item label="驳回维修人" prop="repairPersonName" v-show="addForm.repaiRejectReason != '' && addForm.status == 400">
<el-input placeholder="请输入驳回维修人" disabled v-model="addForm.repairPersonName"
style="width:98%;"></el-input>
</el-form-item>
<el-form-item label="驳回原因" prop="repaiRejectReason" v-show="addForm.repaiRejectReason != '' && addForm.status == 100">
<el-form-item label="驳回原因" prop="repaiRejectReason" v-show="addForm.repaiRejectReason != '' && addForm.status == 400">
<el-input placeholder="请输入驳回原因" v-model="addForm.repaiRejectReason" type="textarea" disabled style="width:98%;"></el-input>
</el-form-item>
<el-form-item label="驳回运维主管" prop="maintenanceTeamName" v-show="addForm.repaiTeamRejectReason != ''">
@ -278,32 +278,35 @@
</el-input>
</el-form-item>
</div>
<div v-show="(repairForm.status >= 2)">
<div v-show="(repairForm.status == 401 ||repairForm.status == 402 ||repairForm.status == 403 || repairForm.status == 301 || repairForm.status == 300 || repairForm.status == 102 || repairForm.status == 103 || repairForm.status == 104)">
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">维修详情</div>
<el-form-item label="维修人" prop="repairPersonName">
<el-input placeholder="请输入维修人"
:disabled="role_id == '1839600115013713921' || (repairForm.status >= 3) || dialogType == 'view'"
:disabled="role_id == '1839600115013713921' || (repairForm.status == 402 || repairForm.status == 301 || repairForm.status == 403 || repairForm.status == 103 || repairForm.status == 202 || repairForm.status == 104 || repairForm.status == 203 || repairForm.status == 204) || dialogType == 'view'"
v-model="repairForm.repairPersonName" style="width:98%;"></el-input>
</el-form-item>
<el-form-item label="设备名称" prop="deviceId">
<el-input
v-show="role_id == '1839600115013713921' || (repairForm.status == 3 || repairForm.status == 5 || repairForm.status == 4) || repairForm.status == 3 || dialogType != 'view'"
style="width: 98%" disabled v-model="repairForm.deviceName"></el-input>
<!-- <el-input
v-show="role_id == '1839600115013713921' || (repairForm.status == 402 || repairForm.status == 103 || repairForm.status == 301) || repairForm.status == 3 || dialogType != 'view'"
style="width: 98%" disabled v-model="repairForm.deviceName"></el-input> -->
<el-select placeholder="请选择设备" v-model="repairForm.deviceId" style="width:98%;" :disabled="dialogType == 'view' || dialogType == 'examine'">
<el-option v-for="item in deviceList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="故障原因" prop="faultCause">
<el-input placeholder="请输入故障原因"
:disabled="role_id == '1839600115013713921' || (repairForm.status == 5 || repairForm.status == 4 || repairForm.status == 3) || dialogType == 'view' || dialogType == 'examine'"
:disabled="role_id == '1839600115013713921' || (repairForm.status == 103 || repairForm.status == 301 || repairForm.status == 402) || dialogType == 'view' || dialogType == 'examine'"
type="textarea" v-model="repairForm.faultCause" style="width:98%;"></el-input>
</el-form-item>
<el-form-item label="处理方法" prop="processMethod">
<el-input placeholder="请输入处理方法"
:disabled="role_id == '1839600115013713921' || (repairForm.status == 5 || repairForm.status == 4 || repairForm.status == 3) || dialogType == 'view' || dialogType == 'examine'"
:disabled="role_id == '1839600115013713921' || (repairForm.status == 103 || repairForm.status == 301 || repairForm.status == 402) || dialogType == 'view' || dialogType == 'examine'"
type="textarea" v-model="repairForm.processMethod" style="width:98%;"></el-input>
</el-form-item>
<el-form-item label="是否需要申领物料" prop="isNeedMaterial"
v-show="role_id != '1839600115013713921' && (repairForm.status != 5 && repairForm.status != 4) && dialogType != 'view'">
v-show="role_id != '1839600115013713921' && (repairForm.status != 103 && repairForm.status != 301) && dialogType != 'view'">
<el-select placeholder="请选择是否需要申领物料" style="width:98%;" @change="changeMaterial"
:disabled="role_id == '1839600115013713921' || (repairForm.status == 5 || repairForm.status == 4 || repairForm.status == 3) || dialogType == 'view' || dialogType == 'examine'"
:disabled="role_id == '1839600115013713921' || (repairForm.status == 103 || repairForm.status == 301 || repairForm.status == 402) || dialogType == 'view' || dialogType == 'examine'"
v-model="repairForm.isNeedMaterial">
<el-option label="是" :value="1"></el-option>
<el-option label="否" :value="0"></el-option>
@ -373,7 +376,8 @@
</el-table>
</el-form-item>
<el-form-item label="维修材料"
v-if="(repairForm.isNeedMaterial == 1 && (repairForm.status >= 3)) && dialogType != 'repair'">
v-if="(repairForm.isNeedMaterial == 1 && (repairForm.status == 402 || repairForm.status == 301 || repairForm.status == 403 || repairForm.status == 103 || repairForm.status == 202 || repairForm.status == 104 || repairForm.status == 203 || repairForm.status == 204 || repairForm.status == 102)) && dialogType != 'repair'">
<!-- v-if="(repairForm.isNeedMaterial == 1 && (repairForm.status >= 3)) && dialogType != 'repair'"> -->
<el-table :data="tableData" border style="width: 98%">
<el-table-column prop="materialName" align="center" label="物料名称"></el-table-column>
<el-table-column prop="inventoryId" align="center" label="库存ID"></el-table-column>
@ -386,7 +390,7 @@
{{ scope.row.price }}
</template>
</el-table-column>
<template slot="append" v-if="(repairForm.status == 3 && role_id == '1839537055389515777') || repairForm.status == 4 || repairForm.status == 5 || repairForm.status == 6 || repairForm.status == 102">
<template slot="append" v-if="(repairForm.status == 402 && role_id == '1839537055389515777') || repairForm.status == 301 || repairForm.status == 103 || repairForm.status == 403 || repairForm.status == 202 || repairForm.status == 102 || repairForm.status == 104">
<tr>
<td style="padding: 10px;padding-right: 0;font-size: 14px;color: #909399;font-weight: 600;">总计:</td>
<td>{{ totalPrice == '' ? totalPrice : totalPrice.toFixed(2) }} </td>
@ -403,7 +407,7 @@
</el-table>
</el-form-item>
</div>
<div v-show="repairType == 'examine' || (repairForm.approvePoint == '主管审批维修方案' && repairForm.approveRemark != '' && repairForm.status == 2)">
<div v-show="repairType == 'examine' || (repairForm.approvePoint == '主管审批维修方案' && repairForm.approveRemark != '' && repairForm.status == 402)">
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">主管审批</div>
<el-form-item label="审批结果" prop="approveResult" >
<el-select placeholder="请选择审批结果" v-model="chargeForm.approveResult" style="width: 98%;" :disabled="repairForm.status == 4 || (repairForm.approvePoint == '主管审批维修方案' && repairForm.approveRemark != '' && repairForm.status == 2)">
@ -439,13 +443,13 @@
<el-input style="width: 98%;" placeholder="请输入审批意见" v-model="clientForm.approveTime" :disabled="repairForm.status == 4 || repairForm.status == 2"></el-input>
</el-form-item>
</div>
<div v-show="((repairForm.repaiRejectReason != '' && addForm.status == 100) || repairForm.repaiTeamRejectReason != '' )">
<div v-show="((repairForm.repaiRejectReason != '' && repairForm.status == 400) || repairForm.repaiTeamRejectReason != '' )">
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">驳回详情</div>
<el-form-item label="驳回维修人" prop="repairPersonName" v-show="repairForm.repaiRejectReason != '' && addForm.status == 100">
<el-form-item label="驳回维修人" prop="repairPersonName" v-show="repairForm.repaiRejectReason != '' && repairForm.status == 400">
<el-input placeholder="请输入驳回维修人" disabled v-model="repairForm.repairPersonName"
style="width:98%;"></el-input>
</el-form-item>
<el-form-item label="驳回原因" prop="repaiRejectReason" v-show="repairForm.repaiRejectReason != '' && addForm.status == 100">
<el-form-item label="驳回原因" prop="repaiRejectReason" v-show="repairForm.repaiRejectReason != '' && repairForm.status == 400">
<el-input placeholder="请输入驳回原因" v-model="repairForm.repaiRejectReason" type="textarea" disabled style="width:98%;"></el-input>
</el-form-item>
</div>
@ -455,8 +459,8 @@
<el-input placeholder="请输入关闭原因" v-model="repairForm.closeReason" type="textarea" disabled></el-input>
</el-form-item>
</div>
<div v-show="repairForm.status == 101 || repairForm.status == 102">
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">{{repairForm.status == 101 ? '主管' : repairForm.status == 102 ? '客户' : ''}}审批结果</div>
<div v-show="repairForm.status == 300 || repairForm.status == 102">
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">{{repairForm.status == 300 ? '主管' : repairForm.status == 102 ? '客户' : ''}}审批结果</div>
<el-form-item label="审批结果" prop="approveResult">
<el-select disabled v-model="repairForm.approveResult"
placeholder="请选择审批结果" style="width: 99%;">
@ -478,7 +482,7 @@
v-model="repairForm.approveRemark"></el-input>
</el-form-item>
</div>
<div v-show="repairForm.status == 7 || repairForm.status == 8 || repairForm.status == 9">
<div v-show="repairForm.status == 104 || repairForm.status == 203 || repairForm.status == 9">
<div style="
color: #101010;
font-size: 20px;
@ -557,7 +561,7 @@
</div>
</div>
</div>
<div v-show="repairForm.status == 7 || repairForm.status == 8 || repairForm.status == 9">
<div v-show="repairForm.status == 104 || repairForm.status == 203 || repairForm.status == 9">
<div style="
color: #101010;
font-size: 20px;
@ -566,7 +570,7 @@
">
签名
</div>
<div v-show="repairForm.status == 7 || repairForm.status == 8 || repairForm.status == 9">
<div v-show="repairForm.status == 104 || repairForm.status == 203 || repairForm.status == 9">
<img :src="repairForm.signatureUrl" alt="">
</div>
<el-form-item label="签名人" prop="signaturePerson">
@ -850,6 +854,7 @@ export default {
mounted() {
this.role_id = this.userInfo.role_id
console.log('role_id---------->', this.role_id)
this.getDeviceList()
getRepairPeople({ isRepair: this.role_id == '1839537055389515777' ? true : false }).then(res => {
this.repairPersonList = res.data.data
})
@ -874,6 +879,11 @@ export default {
}
},
methods: {
getDeviceList(){
getDeviceList({current:1,size:100}).then(res =>{
this.deviceList = res.data.data.records
})
},
sortChange(val){
console.log('val============>',val)
},
@ -967,7 +977,6 @@ export default {
this.totalPrice = res.data.data.totalPrice == -1 ? res.data.data.materials.reduce((sum, item) => sum + item.materialPrice, 0) : res.data.data.totalPrice
this.discount = res.data.data.discount == -1 ? '' : res.data.data.discount
this.discountPrice = res.data.data.discountPrice == -1 ? '' : res.data.data.discountPrice
this.$refs['repairForm'].resetFields()
})
},
//
@ -1040,7 +1049,7 @@ export default {
this.dialogType = 'repair'
this.repairForm.errorVideo = res.data.data.videoAttaches.length > 0 ? res.data.data.videoAttaches[0].link : ''
this.repairForm.errorImg = res.data.data.picAttaches.map(item => { return { name: item.originalName, url: item.link } })
this.repairForm.isNeedMaterial = (this.repairForm.status == 1 || this.repairForm.status == 2 || this.repairForm.status == 3) && this.repairForm.isNeedMaterial == -1 ? '' : this.repairForm.isNeedMaterial
this.repairForm.isNeedMaterial = (this.repairForm.status == 201 || this.repairForm.status == 401 || this.repairForm.status == 402) && this.repairForm.isNeedMaterial == -1 ? '' : this.repairForm.isNeedMaterial
if (this.repairForm.isNeedMaterial != '') {
this.tableData = []
this.repairForm.materials.map(item => {
@ -1437,7 +1446,7 @@ export default {
handleRepairConfirm() {
this.$refs.repairForm.validate(valid => {
if (valid) {
if (this.repairForm.status == 2 || this.repairForm.status == 101) {
if (this.repairForm.status == 401 || this.repairForm.status == 300) {
if (this.repairForm.isNeedMaterial == '1') {
if (this.tableData.length == 0) {
this.$message.error('请至少填写一条维修材料信息')
@ -1461,7 +1470,7 @@ export default {
faultCause: this.repairForm.faultCause,
processMethod: this.repairForm.processMethod,
isNeedMaterial: this.repairForm.isNeedMaterial,
status: 4,
deviceId:this.repairForm.deviceId,
materials: data
}
console.log('query---------->', query)
@ -1481,9 +1490,7 @@ export default {
faultCause: this.repairForm.faultCause,
processMethod: this.repairForm.processMethod,
isNeedMaterial: this.repairForm.isNeedMaterial,
status: 4
}
console.log('query------------->',query)
editData(query).then(res => {
if (res.data.code == 200) {
this.$message.success("提交成功")
@ -1492,7 +1499,7 @@ export default {
}
})
}
}else if(this.repairForm.status == 3 || this.repairForm.status == 102){
}else if(this.repairForm.status == 402 || this.repairForm.status == 102){
let query = {
id:this.repairForm.id,
approvePerson:this.userInfo.user_id,
@ -1550,9 +1557,9 @@ export default {
handleEdit(row) {
getDetail({ id: row.id }).then(res => {
this.addForm = res.data.data
this.addForm.maintenanceTeam = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.maintenanceTeam
this.addForm.dispatchTime = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.dispatchTime
this.addForm.planCompleteTime = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.planCompleteTime
this.addForm.maintenanceTeam = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.maintenanceTeam
this.addForm.dispatchTime = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.dispatchTime
this.addForm.planCompleteTime = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.planCompleteTime
this.addForm.repairPerson = this.role_id == '1839536982874193922' ? '' : res.data.data.repairPerson
this.addForm = {
...this.addForm,
@ -1565,9 +1572,9 @@ export default {
reciveOrder(row){
getDetail({id:row.id}).then(res =>{
this.addForm = res.data.data
this.addForm.maintenanceTeam = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.maintenanceTeam
this.addForm.dispatchTime = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.dispatchTime
this.addForm.planCompleteTime = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.planCompleteTime
this.addForm.maintenanceTeam = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.maintenanceTeam
this.addForm.dispatchTime = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.dispatchTime
this.addForm.planCompleteTime = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.planCompleteTime
this.addForm.repairPerson = this.role_id == '1839536982874193922' ? '' : res.data.data.repairPerson
this.addForm = {
...this.addForm,
@ -1581,9 +1588,9 @@ export default {
takeOrders(row){
getDetail({id:row.id}).then(res =>{
this.addForm = res.data.data
this.addForm.maintenanceTeam = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.maintenanceTeam
this.addForm.dispatchTime = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.dispatchTime
this.addForm.planCompleteTime = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.planCompleteTime
this.addForm.maintenanceTeam = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.maintenanceTeam
this.addForm.dispatchTime = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.dispatchTime
this.addForm.planCompleteTime = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.planCompleteTime
this.addForm.repairPerson = this.role_id == '1839536982874193922' ? '' : res.data.data.repairPerson
this.addForm = {
...this.addForm,
@ -1669,7 +1676,7 @@ export default {
dispatchTime: this.addForm.dispatchTime,
planCompleteTime: this.addForm.planCompleteTime,
repairPerson: this.role_id == '1839536982874193922' ? this.addForm.repairPerson : null,
status: this.role_id == '1839536982874193922' ? 2 : this.role_id == '1839537055389515777' ? 2 : this.role_id == '1839552581620793346' ? 3 : '',
// status: this.role_id == '1839536982874193922' ? 2 : this.role_id == '1839537055389515777' ? 2 : this.role_id == '1839552581620793346' ? 3 : '',
remark: this.addForm.remark,
customerOpinion: this.addForm.customerOpinion
}
@ -1759,11 +1766,11 @@ export default {
let query = {
current: this.page.currentPage, //
size: this.page.pageSize, //
startTime: this.searchForm.timeRange.length != 0 ? this.searchForm.timeRange[0].toString() + ' 00:00:00' : '', //
endTime: this.searchForm.timeRange.length != 0 ? this.searchForm.timeRange[1].toString() + ' 23:59:59' : '', //
startTime: this.searchForm.timeRange && this.searchForm.timeRange.length != 0 ? this.searchForm.timeRange[0].toString() + ' 00:00:00' : '', //
endTime: this.searchForm.timeRange && this.searchForm.timeRange.length != 0 ? this.searchForm.timeRange[1].toString() + ' 23:59:59' : '', //
faultType: this.searchForm.faultType ? this.searchForm.faultType : '', //
reportUnitName: this.searchForm.reportUnitName ? this.searchForm.reportUnitName : '',
dataType: this.role_id == '1839536982874193922' || this.role_id == '1839600115013713921' ? 2 : this.role_id == '1839537055389515777' ? 3 : this.role_id == '1839552581620793346' ? 4 : ''
// dataType: this.role_id == '1839536982874193922' || this.role_id == '1839600115013713921' ? 2 : this.role_id == '1839537055389515777' ? 3 : this.role_id == '1839552581620793346' ? 4 : ''
}
getList(query).then(res => {
this.data = res.data.data.records

@ -44,6 +44,11 @@
@blur="(event) => { changeDescribe(event, index) }">
</el-input>
</template>
<template slot-scope="{disabled,type}" slot="informant">
<el-select v-model="item.form.informant" placeholder="请选择关联实验室" @change="(val) => changeLab(val,index)">
<el-option v-for="item in labData" :key="item.id" :label="item.deptName + '(' + item.phone + ')'" :value="item.id"></el-option>
</el-select>
</template>
<template slot-scope="{disabled,size}" slot="imgUrl">
<el-upload action="/api/blade-resource/oss/endpoint/put-file" list-type="picture-card" :headers="headers"
:on-success="handleSuccess(index)" :on-remove="handleRemove(index)" multiple :before-upload="beforeAvatarUpload(index)"
@ -70,13 +75,10 @@ import {getToken, removeToken, removeRefreshToken} from '@/util/auth';
import SelectTree from '../../components/selectTree/tree.vue'
import { getDeviceList } from '@/api/device/device'
import { getChildList } from '@/api/system/dictbiz'
import { saveData, editData, saveDraft } from '@/api/operation/hand'
import { saveData, editData, saveDraft,serviceSave,serviceDraft,getAllUser } from '@/api/operation/hand'
import { nextTick } from 'vue';
import Compressor from 'compressorjs';
// import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg';
// import { compressVideo } from 'video-conversion';
// import ffmpeg from "@/util/ffmpeg";
import { mapGetters } from "vuex";
export default {
name: 'requestSub',
props: {
@ -98,27 +100,21 @@ export default {
editId: '',
headers:{
}
},
labData:[],
}
},
mounted() {
this.getLabData()
this.headers = {
"Authorization":`Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
'Blade-Auth':'bearer ' + getToken(),
'Blade-Requested-With':'BladeHttpRequest'
}
console.log('333333333333333333333',this.headers)
console.log('this.userInfo.role_id',this.userInfo.role_id)
if ((this.title == '编辑' && JSON.stringify(this.form) != '{}') || JSON.stringify(this.form) != '{}') {
this.editId = this.form.id
for (let key in this.form) {
// this.addForm[0].form.deviceName = this.form.deviceName
// this.addForm[0].form.faultPosition.node = this.deviceList.find(item => item.id == this.form.deviceName).position
// this.addForm[0].form.faultType = this.deviceList.find(item => item.id == this.form.deviceName).type
// this.addForm[0].form.faultDescribe = this.form.faultDescribe
// this.addForm[0].form.picAttaches = this.form.picAttaches
// this.addForm[0].form.videoAttaches = this.form.videoAttaches
// this.addForm[0].formOption.column.find(item => item.prop == 'errorVideo').value = this.form.videoAttaches[0].link
// this.addForm[0].formOption.column.find(item => item.prop == 'imgUrl').value = this.form.picAttaches.map(item => item.link)
this.addForm = [
{
form: {
@ -136,6 +132,15 @@ export default {
submitBtn: false,
menuPosition: 'right',
column: [
{
label: "关联实验室",
labelWidth: 120,
span: 24,
prop: "informant",
type: "select",
formslot: true,
display:this.userInfo.role_id == '1839536982874193922' ? true : false
},
{
label: "故障现象描述",
labelWidth: 120,
@ -225,7 +230,6 @@ export default {
]
}
} else {
console.log('2222222222222222222222222')
this.addForm = [
{
form: {
@ -243,6 +247,15 @@ export default {
submitBtn: false,
menuPosition: 'right',
column: [
{
label: "关联实验室",
labelWidth: 120,
span: 24,
prop: "informant",
type: "select",
formslot: true,
display:this.userInfo.role_id == '1839536982874193922' ? true : false
},
{
label: "故障现象描述",
labelWidth: 120,
@ -325,35 +338,19 @@ export default {
},
]
}
// getDeviceList({ current: 1, size: 100 }).then(res => {
// this.deviceList = res.data.data.records
// getChildList(1, 100, '1846802246527463425').then(res => {
// this.typeList = res.data.data
// })
// getChildList(1, 100, '1846792623628001282').then(res => {
// this.treeOptions = res.data.data
// console.log('addForm------------>', this.addForm)
// })
// })
console.log('addForm------------->',this.addForm)
this.$forceUpdate()
},
computed: {
...mapGetters(["userInfo", "permission", "systemTime"]),
},
watch: {
form(newVal, oldVal) {
console.log('newVal---------------------')
let arr = JSON.parse(JSON.stringify(this.addForm))
if ((this.title == '编辑' && JSON.stringify(this.form) != '{}') || JSON.stringify(this.form) != '{}') {
this.editId = this.form.id
for (let key in this.form) {
// this.addForm[0].form.deviceName = this.form.deviceName
// this.addForm[0].form.faultPosition.node = this.deviceList.find(item => item.id == this.form.deviceName).position
// this.addForm[0].form.faultType = this.deviceList.find(item => item.id == this.form.deviceName).type
// this.addForm[0].form.faultDescribe = this.form.faultDescribe
// this.addForm[0].form.picAttaches = this.form.picAttaches
// this.addForm[0].form.videoAttaches = this.form.videoAttaches
// this.addForm[0].formOption.column.find(item => item.prop == 'errorVideo').value = this.form.videoAttaches[0].link
// this.addForm[0].formOption.column.find(item => item.prop == 'imgUrl').value = this.form.picAttaches.map(item => item.link)
this.addForm = [
{
form: {
@ -372,6 +369,15 @@ export default {
submitBtn: false,
menuPosition: 'right',
column: [
{
label: "关联实验室",
labelWidth: 120,
span: 24,
prop: "informant",
type: "select",
formslot: true,
display:this.userInfo.role_id == '1839536982874193922' ? true : false
},
{
label: "故障现象描述",
labelWidth: 120,
@ -472,6 +478,15 @@ export default {
submitBtn: false,
menuPosition: 'right',
column: [
{
label: "关联实验室",
labelWidth: 120,
span: 24,
prop: "informant",
type: "select",
formslot: true,
display:this.userInfo.role_id == '1839536982874193922' ? true : false
},
{
label: "故障现象描述",
labelWidth: 120,
@ -557,6 +572,61 @@ export default {
},
methods: {
getLabData(){
getAllUser().then(res =>{
console.log()
this.labData = res.data.data
})
// this.labData = [
// {
// id: "1859474667806449666",
// createUser: "-1",
// createDept: "-1",
// createTime: "2024-11-21 13:51:23",
// updateUser: "1123598821738675201",
// updateTime: "2024-12-05 15:35:54",
// status: 1,
// isDeleted: 0,
// tenantId: "000000",
// code: "",
// userType: 1,
// account: "17852327323",
// name: "",
// realName: "",
// avatar: "",
// email: "",
// phone: "17852327323",
// birthday: "",
// sex: -1,
// roleId: "1846419477876510721",
// deptId: "1862052949173280770",
// deptName: "",
// postId: "1839605322925801474",
// address: "33",
// addressLon: "120.48031277706768",
// addressLat: "36.11160956229114",
// isMaintenanceClient: -1,
// tenantName: "",
// userTypeName: "WEB",
// roleName: "",
// postName: "",
// sexName: "",
// userExt: ""
// }
// ]
},
//
changeLab(val,index){
console.log('val----------->',val)
console.log('index----------->',index)
this.addForm[index].form = {
...this.addForm[index].form,
informant:val,
informantPhone:this.labData.find(item => item.id == val).phone,
reportUnit:this.labData.find(item => item.id == val).deptId,
createDept:this.labData.find(item => item.id == val).createDept,
}
},
//
changeDevice(value, row) {
console.log('value---------->', value)
@ -745,7 +815,6 @@ export default {
handleAdd() {
let count = 0
this.addForm.forEach((formItem, index) => {
console.log('form------------>', this.$refs[`form${index}`])
this.$refs[`form${index}`][0].validate((valid) => {
if (valid) {
console.log(`表单项${index}验证通过`);
@ -770,6 +839,15 @@ export default {
submitBtn: false,
menuPosition: 'right',
column: [
{
label: "关联实验室",
labelWidth: 120,
span: 24,
prop: "informant",
type: "select",
formslot: true,
display:this.userInfo.role_id == '1839536982874193922' ? true : false
},
{
label: "故障现象描述",
labelWidth: 120,
@ -856,26 +934,6 @@ export default {
}
});
});
// let emptyPos = this.addForm.find((item) => item.form.faultPosition == "");
// let emptyDevice = this.addForm.find((item) => item.form.deviceName == "");
// let emptyType = this.addForm.find((item) => item.form.faultType == "");
// let emptyDes = this.addForm.find((item) => item.form.faultDescribe == "");
// let emptyVideo = this.addForm.find((item) => item.form.errorVideo == "");
// let emptyImg = this.addForm.find(
// (item) => item.form.picAttaches.length == 0
// );
// if (
// emptyPos ||
// emptyDevice ||
// emptyType ||
// emptyDes ||
// emptyVideo ||
// emptyImg
// ) {
// this.$message.error("");
// } else {
// }
},
//
handleCancel() {
@ -989,34 +1047,66 @@ export default {
console.log(`表单项${index}验证通过`);
//
} else {
console.log(`表单项${index}验证失败`);
if (this.addForm[index].form.faultDescribe != '') {
count++
this.$refs[`form${index}`][0].clearValidate()
if(count == this.addForm.length){
let data = []
this.addForm.map(item => {
data.push({
faultLocation: item.form.faultPosition.node,
deviceName: item.form.deviceName,
faultType: item.form.faultType,
videoAttaches: item.form.videoAttaches,
picAttaches: item.form.picAttaches,
faultDescribe: item.form.faultDescribe,
if(this.userInfo.role_id == '1839536982874193922'){
//
if (this.addForm[index].form.faultDescribe != '' && this.addForm[index].form.informant != ''){
count++
this.$refs[`form${index}`][0].clearValidate()
if(count == this.addForm.length){
let data = []
this.addForm.map(item => {
data.push({
faultLocation: item.form.faultPosition.node,
deviceName: item.form.deviceName,
faultType: item.form.faultType,
videoAttaches: item.form.videoAttaches,
picAttaches: item.form.picAttaches,
faultDescribe: item.form.faultDescribe,
createDept:item.form.createDept,
informant:item.form.informant,
informantPhone:item.form.informantPhone,
reportUnit:item.form.reportUnit,
})
})
})
console.log('data============>', data)
saveDraft(data).then(res => {
if (res.data.code == 200) {
this.$message.success('保存成功')
this.$emit('close')
}
})
this.$emit('close')
console.log('data============>', data)
serviceDraft(data).then(res => {
if (res.data.code == 200) {
this.$message.success('保存成功')
this.$emit('close')
}
})
this.$emit('close')
}
}
}else{
if (this.addForm[index].form.faultDescribe != '') {
count++
this.$refs[`form${index}`][0].clearValidate()
if(count == this.addForm.length){
let data = []
this.addForm.map(item => {
data.push({
faultLocation: item.form.faultPosition.node,
deviceName: item.form.deviceName,
faultType: item.form.faultType,
videoAttaches: item.form.videoAttaches,
picAttaches: item.form.picAttaches,
faultDescribe: item.form.faultDescribe,
})
})
console.log('data============>', data)
saveDraft(data).then(res => {
if (res.data.code == 200) {
this.$message.success('保存成功')
this.$emit('close')
}
})
this.$emit('close')
}
}
}
}
});
@ -1026,126 +1116,93 @@ export default {
},
//
handleConfirm(index) {
// let emptyPos = this.addForm.find((item) => item.form.faultPosition == "");
// let emptyDevice = this.addForm.find((item) => item.form.deviceName == "");
// let emptyType = this.addForm.find((item) => item.form.faultType == "");
// let emptyDes = this.addForm.find((item) => item.form.faultDescribe == "");
// let emptyVideo = this.addForm.find((item) => item.form.errorVideo == "");
// let emptyImg = this.addForm.find(
// (item) => item.form.picAttaches.length == 0
// );
// if (
// emptyPos ||
// emptyDevice ||
// emptyType ||
// emptyDes ||
// emptyVideo ||
// emptyImg
// ) {
// console.log('emptyPos----------->',emptyPos)
// console.log('emptyDevice----------->',emptyDevice)
// console.log('emptyType----------->',emptyType)
// console.log('emptyDes----------->',emptyDes)
// console.log('emptyVideo----------->',emptyVideo)
// console.log('emptyImg----------->',emptyImg)
// this.$message.error("");
// } else {
// console.log('addForm---------->', this.addForm)
// let data = []
// this.addForm.map(item => {
// data.push({
// id: this.editId ? this.editId : null,
// faultLocation: item.form.faultPosition.node,
// deviceName: item.form.deviceName,
// faultType: item.form.faultType,
// videoAttaches: item.form.videoAttaches,
// picAttaches: item.form.picAttaches,
// faultDescribe: item.form.faultDescribe,
// submitType: 1
// })
// })
// console.log('data============>', data)
// // if (this.title == '') {
// console.log('11111111111111111')
// saveData(data).then(res => {
// console.log('res------------------->', res)
// if (res.data.code == 200) {
// this.$message.success('')
// this.$emit('close')
// }
// })
// // } else if (this.title == '') {
// // let query = {
// // id: this.editId ? this.editId : null,
// // faultLocation: this.addForm[0].form.faultPosition.node,
// // deviceName: this.addForm[0].form.deviceName,
// // faultType: this.addForm[0].form.faultType,
// // videoAttaches: this.addForm[0].form.videoAttaches,
// // picAttaches: this.addForm[0].form.picAttaches,
// // faultDescribe: this.addForm[0].form.faultDescribe,
// // submitType: 1
// // }
// // console.log('22222222222222222222222')
// // editData(query).then(res => {
// // console.log('res------------------->', res)
// // if (res.data.code == 200) {
// // this.$message.success('')
// // this.$emit('close')
// // }
// // })
// // }
// }
// this.$refs.item[index].validate((valid, done,msg) => {
// console.log('valid ------------->',valid)
// })
let count = 0
this.addForm.forEach((formItem, index) => {
console.log('form------------>', this.$refs[`form${index}`])
this.$refs[`form${index}`][0].validate((valid) => {
if (valid) {
console.log(`表单项${index}验证通过`);
//
} else {
console.log(`表单项${index}验证失败`);
if (this.addForm[index].form.faultDescribe != '') {
count++
this.$refs[`form${index}`][0].clearValidate()
if(count == this.addForm.length){
let data = []
this.addForm.map(item => {
data.push({
id: this.editId ? this.editId : null,
faultLocation: item.form.faultPosition,
deviceName: item.form.deviceName,
faultType: item.form.faultType,
videoAttaches: item.form.videoAttaches,
picAttaches: item.form.picAttaches,
faultDescribe: item.form.faultDescribe,
submitType: 1
if(this.userInfo.role_id == '1839536982874193922'){
//
if (this.addForm[index].form.faultDescribe != '' && this.addForm[index].form.informant != '') {
count++
this.$refs[`form${index}`][0].clearValidate()
if(count == this.addForm.length){
let data = []
this.addForm.map(item => {
data.push({
id: this.editId ? this.editId : null,
faultLocation: item.form.faultPosition,
deviceName: item.form.deviceName,
faultType: item.form.faultType,
videoAttaches: item.form.videoAttaches,
picAttaches: item.form.picAttaches,
faultDescribe: item.form.faultDescribe,
submitType: 1,
createDept:item.form.createDept,
informant:item.form.informant,
informantPhone:item.form.informantPhone,
reportUnit:item.form.reportUnit,
})
})
})
console.log('data---------->',data)
if(data.videoAttaches && data.picAttaches && data.videoAttaches.length + data.picAttaches.length > 3){
this.$message.error('故障视频与故障图片最多可上传3个')
}else if (data.videoAttaches && !data.picAttaches && data.videoAttaches.length > 3){
this.$message.error('故障视频与故障图片最多可上传3个')
}else if (!data.videoAttaches && data.picAttaches && data.picAttaches.length > 3){
this.$message.error('故障视频与故障图片最多可上传3个')
}else{
saveData(data).then(res => {
console.log('res------------------->', res)
if (res.data.code == 200) {
this.$message.success('新增成功')
this.$emit('close')
}
if(data.videoAttaches && data.picAttaches && data.videoAttaches.length + data.picAttaches.length > 3){
this.$message.error('故障视频与故障图片最多可上传3个')
}else if (data.videoAttaches && !data.picAttaches && data.videoAttaches.length > 3){
this.$message.error('故障视频与故障图片最多可上传3个')
}else if (!data.videoAttaches && data.picAttaches && data.picAttaches.length > 3){
this.$message.error('故障视频与故障图片最多可上传3个')
}else{
console.log('data===========>',data)
serviceSave(data).then(res =>{
console.log('res------------------->', res)
if (res.data.code == 200) {
this.$message.success('新增成功')
this.$emit('close')
}
})
}
}
}
}else{
if (this.addForm[index].form.faultDescribe != '') {
count++
this.$refs[`form${index}`][0].clearValidate()
if(count == this.addForm.length){
let data = []
this.addForm.map(item => {
data.push({
id: this.editId ? this.editId : null,
faultLocation: item.form.faultPosition,
deviceName: item.form.deviceName,
faultType: item.form.faultType,
videoAttaches: item.form.videoAttaches,
picAttaches: item.form.picAttaches,
faultDescribe: item.form.faultDescribe,
submitType: 1
})
})
console.log('data---------->',data)
if(data.videoAttaches && data.picAttaches && data.videoAttaches.length + data.picAttaches.length > 3){
this.$message.error('故障视频与故障图片最多可上传3个')
}else if (data.videoAttaches && !data.picAttaches && data.videoAttaches.length > 3){
this.$message.error('故障视频与故障图片最多可上传3个')
}else if (!data.videoAttaches && data.picAttaches && data.picAttaches.length > 3){
this.$message.error('故障视频与故障图片最多可上传3个')
}else{
saveData(data).then(res => {
console.log('res------------------->', res)
if (res.data.code == 200) {
this.$message.success('新增成功')
this.$emit('close')
}
})
}
}
}
}
}
});

@ -120,7 +120,7 @@
:disabled="viewType == 'view'"></el-cascader>
</el-form-item>
<el-form-item label="" prop="lab" v-if="role_id=='1839536982874193922'">
<el-checkbox v-model="addForm.isMaintain" :disabled="viewType == 'view'"> 是否在保</el-checkbox>
<el-checkbox v-model="addForm.isWarran" :disabled="viewType == 'view'"> 是否在保</el-checkbox>
</el-form-item>
</div>
<div>
@ -227,7 +227,7 @@
import printJS from 'print-js'
import { mapGetters } from "vuex";
import requestSub from '../components/requestSub.vue'
import { getDeviceList, addDevice, getDetail, editDevice, deleteDevice, qrcode, importFile } from '@/api/device/device'
import { getDeviceList, addDevice, getDetail, editDevice, deleteDevice, qrcode, importFile,getLabList } from '@/api/device/device'
import { getChildList } from '@/api/system/dictbiz'
import { getDeepData } from '@/api/labManagement/inspectionManagement'
import SelectTree from '../../components/selectTree/tree'
@ -408,7 +408,7 @@ export default {
lazyLoad(node, resolve) {
const { level, value } = node;
if (level == 0) {
getDeepData({ parentId: 0 }).then(res => {
getLabList().then(res => {
let firstNode = []
res.data.data.map(item => {
firstNode.push({
@ -797,24 +797,26 @@ export default {
floorId: this.addForm.lab[1], //id
roomId: this.addForm.lab[2], //id
brand:this.addForm.brand,//
isWarran:this.addForm.isWarran
}
if (this.viewType == 'add') {
addDevice(query).then(res => {
if (res.data.code == 200) {
this.$message.success('新增成功!')
this.dialogVisible = false
this.onLoad()
}
})
} else if (this.viewType == 'edit') {
editDevice(query).then(res => {
if (res.data.code == 200) {
this.$message.success('修改成功!')
this.dialogVisible = false
this.onLoad()
}
})
}
console.log('query----------------->',query)
// if (this.viewType == 'add') {
// addDevice(query).then(res => {
// if (res.data.code == 200) {
// this.$message.success('!')
// this.dialogVisible = false
// this.onLoad()
// }
// })
// } else if (this.viewType == 'edit') {
// editDevice(query).then(res => {
// if (res.data.code == 200) {
// this.$message.success('!')
// this.dialogVisible = false
// this.onLoad()
// }
// })
// }
}
})
},

@ -9,6 +9,9 @@
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</template>
<!-- <template slot-scope="{row}" slot="repairStatusSearch">
</template> -->
<template slot-scope="{ row }" slot="status">
<!-- -1-待提报 0-待接单 1,23-待维修 4-确认方案 5-维修中 6-待评价 7-待付款 8-已完成/待开发票 9-已开发票 -->
<!-- <el-tag size="small" :type="row.status == -1 || row.status == 4 || row.status == 2 || row.status == 3 ? ''
@ -76,12 +79,11 @@
</template>
<template slot-scope="{ row }" slot="menu">
<el-button @click="handleView(row)">查看</el-button>
<el-button v-show="row.status == -1" @click="handleEdit(row)">编辑</el-button>
<el-button v-show="row.status == -1" @click="handleSubmit(row)">提交</el-button>
<el-button v-show="row.status == 4" @click="confirmOrder(row)">确认</el-button>
<el-button v-show="row.status == 6 || row.status == 20" @click="handleEvaluate(row)">评价</el-button>
<el-button v-show="row.status == 200 || row.status == 100" @click="handleEdit(row)">编辑</el-button>
<el-button v-show="row.status == 200 || row.status == 100" @click="handleSubmit(row)">提交</el-button>
<el-button v-show="row.status == 301" @click="confirmOrder(row)">确认</el-button>
<el-button v-show="row.status == 403 || row.status == 20" @click="handleEvaluate(row)">评价</el-button>
<el-button @click="handleExport(row)">导出</el-button>
<!-- <el-button v-show="row.status == 9" @click="clickPrint(row)">发票打印</el-button> -->
</template>
</avue-crud>
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" :append-to-body="true" width="50%">
@ -265,7 +267,7 @@
<el-input v-model="detailForm.approveTime" style="width: 98%;" disabled></el-input>
</el-form-item>
</div>
<div v-show="(rowStatus == 4 || rowStatus == 5) && viewType != 'view'">
<div v-show="(rowStatus == 301 || rowStatus == 5) && viewType != 'view'">
<div style="
color: #101010;
font-size: 20px;
@ -292,7 +294,7 @@
<el-input v-model="detailForm.approveTime" style="width: 98%;" disabled></el-input>
</el-form-item>
</div>
<div v-show="rowStatus == 6">
<div v-show="rowStatus == 403">
<div style="
color: #101010;
font-size: 20px;
@ -308,14 +310,15 @@
<el-option label="否" :value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item label="维修未完成原因" v-show="rowStatus == 6 && detailForm.approveResult1 == 0">
<el-form-item label="维修未完成原因" v-show="rowStatus == 403 && detailForm.approveResult1 == 0">
<el-input type="textarea" v-model="detailForm.approveRemark" placeholder="请输入维修未完成原因" style="width: 98%;"
:disabled="viewType == 'view'"></el-input>
</el-form-item>
</div>
<div v-show="(rowStatus == 6 && detailForm.approveResult1 == 0)"></div>
<div v-show="(rowStatus == 403 && detailForm.approveResult1 == 0)"></div>
<!-- || (rowStatus == 20 || isEvalute) || rowStatus == 7 || rowStatus == 8 || rowStatus == 9" -->
<div
v-show="((rowStatus == 6 || isEvalute) && detailForm.approveResult1 == 1) || (rowStatus == 20 || isEvalute) || rowStatus == 7 || rowStatus == 8 || rowStatus == 9">
v-show="((rowStatus == 403 || isEvalute ) && detailForm.approveResult1 == 1) || rowStatus == 104 || rowStatus == 203">
<div style="
color: #101010;
font-size: 20px;
@ -395,7 +398,7 @@
</div>
</div>
<div
v-show="((rowStatus == 6 || isEvalute) && detailForm.approveResult1 == 1) || (rowStatus == 20 || isEvalute) || rowStatus == 7 || rowStatus == 8 || rowStatus == 9">
v-show="((rowStatus == 6 || isEvalute) && detailForm.approveResult1 == 1) || rowStatus == 104 || rowStatus == 203">
<div style="
color: #101010;
font-size: 20px;
@ -405,14 +408,13 @@
签名
</div>
<div style="margin-bottom: 10px;cursor: pointer;" @click="clickAssign"
v-show="nameImg == '' && rowStatus != 7 && rowStatus != 8 && rowStatus != 9">
v-show="nameImg == '' && rowStatus != 104 && rowStatus != 203 && rowStatus != 9">
<img src="@/assets/images/assign.png" alt="">
</div>
<div v-show="nameImg != ''" @click="clickAssign">
<img :src="nameImg" alt="">
</div>
<div v-show="detailForm.signatureUrl != '' && (rowStatus == 7 || rowStatus == 8 || rowStatus == 9)"
@click="clickAssign">
<div v-show="detailForm.signatureUrl != '' && (rowStatus == 104 || rowStatus == 203 || rowStatus == 9)">
<img :src="detailForm.signatureUrl" alt="">
</div>
<!-- <div v-show="isEvalute">
@ -557,7 +559,7 @@ import moment from "moment";
import { dateFormat } from "../../util/date";
import requestSub from '../components/requestSub.vue'
import requirement from '../components/requirement.vue'
import { getList, getDetail, evaluateSign, addFile, saveData, customerConfirm, customerReject, customerRepairConfirm, customerRepairReject, serviceInvoice } from '@/api/operation/hand'
import { servicePage,getList, getDetail, evaluateSign, addFile, saveData, customerConfirm, customerReject, customerRepairConfirm, customerRepairReject, serviceInvoice,getAllUser } from '@/api/operation/hand'
import { getDeviceList } from '@/api/device/device'
import { getChildList } from '@/api/system/dictbiz'
import statusData from "@/assets/json/status.json"; //
@ -716,6 +718,15 @@ export default {
slot: true,
formslot: true,
},
// {
// label: "",
// labelWidth: 120,
// prop: "repairStatus",
// hide:true,
// slot: true,
// search:true,
// formslot: true,
// },
{
label: "完成时间",
labelWidth: 120,
@ -869,7 +880,7 @@ export default {
this.typeList = res.data.data
console.log('typeList------->', this.typeList)
})
this.searchForm.timeRange = [moment().subtract(7, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]
// this.searchForm.timeRange = [moment().subtract(7, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]
},
mounted() { },
methods: {
@ -884,6 +895,9 @@ export default {
//
changeResult(val) {
this.isFinish = val
if(val == 0){
this.detailForm.approveRemark = ''
}
console.log(this.isFinish)
},
//
@ -1210,7 +1224,7 @@ export default {
},
searchReset(params, done) {
this.searchForm = {
timeRange: [moment().subtract(7, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
// timeRange: [moment().subtract(7, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
faultLocation: '',
faultType: ''
}
@ -1246,12 +1260,22 @@ export default {
requirementCode:this.searchForm.requirementCode
}
console.log('query--------->', query)
getList(query).then(res => {
console.log('res------------->', res.data.data)
this.data = res.data.data.records
this.page.total = res.data.data.total
this.loading = false
})
if(this.role_id == '1839536982874193922'){
servicePage(query).then(res =>{
console.log('res------------->', res.data.data)
this.data = res.data.data.records
this.page.total = res.data.data.total
this.loading = false
})
}else{
getList(query).then(res => {
console.log('res------------->', res.data.data)
this.data = res.data.data.records
this.page.total = res.data.data.total
this.loading = false
})
}
},
},
};

@ -131,6 +131,10 @@
slot="userTypeName">
<el-tag>{{row.userTypeName}}</el-tag>
</template>
<template slot-scope="{row}"
slot="isMaintenanceClient" v-if="row.isMaintenanceClient != -1">
<el-tag>{{row.isMaintenanceClient == 0 ? '维修客户' : row.isMaintenanceClient == 1 ? '维保客户' : ''}}</el-tag>
</template>
</avue-crud>
<el-dialog title="用户角色配置"
append-to-body
@ -351,6 +355,12 @@
slot: true,
display: false
},
{
label: "用户类型",
prop: "isMaintenanceClient",
slot: true,
display: false
},
{
label: "用户平台",
type: "select",

@ -8,7 +8,7 @@
</div>
<div class="top_box">
<div class="top_left">
<img style="width:100%;height:100%;" :src="backGroundPic" alt="">
<img style="width:100%;height:100%;border-radius: 10px;" :src="backGroundPic" alt="">
</div>
<div class="top_right">
<div class="work_box">
@ -83,7 +83,7 @@
</div> -->
</div>
</vueSeamless>
<el-empty class="xj_con_box" v-show="inspectionList.length == 0" description="暂无报警"></el-empty>
<el-empty class="xj_con_box" v-show="inspectionList.length == 0" description="暂无数据"></el-empty>
</div>
</div>
<div class="xj_box">
@ -95,7 +95,7 @@
<div class="tit_box">
<div class="xj_title">{{ item.requirementCode }}</div>
</div>
<div class="xj_task">{{ status }}</div>
<div class="xj_task">{{ getStatus('maintain', role_id, item.status).name}}</div>
</div>
<div class="xj_center">
<div class="xj_status">{{ item.faultDescribe }}</div>
@ -105,7 +105,7 @@
</div> -->
</div>
</vueSeamless>
<el-empty class="xj_con_box" v-show="requirementList.length == 0" description="暂无报警"></el-empty>
<el-empty class="xj_con_box" v-show="requirementList.length == 0" description="暂无数据"></el-empty>
</div>
</div>
</div>
@ -228,14 +228,15 @@
<div class="bottom_con">
<div class="static_box">
<div class="static_top">
<div>{{ (role_id == '1839536982874193922'||role_id == '1867020647911350274') ? '各单位提报统计' : '各班组提报统计' }}</div>
<div>选择时间
<div>{{ (role_id == '1839536982874193922'||role_id == '1867020647911350274') ? '各单位提报统计' : '各维修人员数据统计' }}</div>
<div style="margin-left: 20px;">选择时间
<el-date-picker v-model="staticTime" type="daterange" range-separator="" start-placeholder="开始日期"
end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changestaticTime">
end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changestaticTime" size="mini">
</el-date-picker>
</div>
</div>
<div class="static_chart" id="unitCharts"></div>
<div class="static_chart" id="unitCharts" v-show="role_id == '1839536982874193922'"></div>
<div class="static_chart" id="peopleCharts" v-show="role_id == '1839537055389515777'"></div>
</div>
<div class="static_box">
<div class="static_top">
@ -243,7 +244,7 @@
<div>
选择时间
<el-date-picker v-model="faultTime" type="daterange" range-separator="" start-placeholder="开始日期"
end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeFaultTime">
end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeFaultTime" size="mini">
</el-date-picker>
<!-- <el-select v-model="typeValue" placeholder="请选择">
<el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value">
@ -278,8 +279,9 @@ import Map from './map.vue'
import vueSeamless from 'vue-seamless-scroll'
import { getUserInfo } from "@/api/system/user";
import { getList } from '@/api/operation/hand'
import { overview, workList, deviceList, upkeepStat, pieStat, mapAddress, limsInspecList, overviewList, limsInspecChart, faultRatio } from '@/api/workbench/workbench'
import { overview, workList, deviceList, upkeepStat, pieStat,maintenancePersonnel, mapAddress, limsInspecList, overviewList, limsInspecChart, faultRatio } from '@/api/workbench/workbench'
import { color } from 'echarts';
import statusData from "@/assets/json/status.json"; //
export default {
components: {
@ -401,11 +403,27 @@ export default {
{name: "通风柜", value: 735}
],
problemData: [],
rateData: []
rateData: [],
peopleXdata:[],
peopleNum:[],
peoplePercent:[]
}
},
computed: {
...mapGetters(["userInfo", "permission"]),
getStatus() {
return (type, id, status) => {
for (let i in statusData[type]) {
let val
statusData[type][id].map(item => {
if (item.status == status) {
val = item
}
})
return val
}
}
},
},
mounted() {
console.log('userInfo=============>',this.userInfo)
@ -445,6 +463,7 @@ export default {
this.getlimsInspecList()
this.getOverviewList()
this.getlimsInspecChart()
this.getPeopleNum()
this.getFaultRatio()
// this.createProblemEcharts()
// this.createProbabilityEcharts()
@ -463,6 +482,17 @@ export default {
}
},
methods: {
getPeopleNum(){
maintenancePersonnel({id:this.userInfo.user_id}).then(res =>{
console.log('res ==============>',res)
this.peopleXdata = res.data.data.xData
this.peopleNum = res.data.data.repairNum
this.peoplePercent = res.data.data.percent
this.$nextTick(() =>{
this.creatpeopleEcharts()
})
})
},
clickReqiure(item){
console.log('item----------->',item)
this.$router.push({
@ -727,16 +757,17 @@ export default {
data: this.xData,
},
grid: {
top: '20%',
top: '22%',
left: '5%',
right: '5%',
bottom: '15%'
bottom: '10%'
},
yAxis: {},
series: [
{
name: '数量',
type: 'bar',
barWidth:this.numData == 1 ? 50 : null,
data: this.numData,
itemStyle: {
color: '#2478f2'
@ -752,6 +783,65 @@ export default {
//4.使
myChart.setOption(option);
},
creatpeopleEcharts() {
var myChart = this.$echarts.init(document.getElementById('peopleCharts'));
var option = {
tooltip: {
trigger: 'axis',
transitionDuration: 0,//
},
legend: { //
data: ['维修数量','好评率'],
},
xAxis: {
type: 'category',
data: this.peopleXdata,
axisPointer: {
type: 'shadow'
}
},
grid: {
top: '22%',
left: '5%',
right: '5%',
bottom: '10%'
},
yAxis: [
{
type: 'value',
name: '维修数量',
},
{
type: 'value',
name: '好评率',
min: 0,
max: 100,
}
],
series: [
{
name: '维修数量',
type: 'bar',
barWidth:this.numData == 1 ? 50 : null,
data: this.peopleNum,
itemStyle: {
color: '#2478f2'
},
},
{
name: '好评率',
type: 'line',
yAxisIndex: 1,
data: this.peoplePercent,
itemStyle: {
color: '#2478f2'
},
},
]
};
//4.使
myChart.setOption(option);
},
createProblemEcharts() {
var myChart = this.$echarts.init(document.getElementById('problem_charts'));
var option = {
@ -1012,7 +1102,7 @@ export default {
overflow: hidden;
::v-deep .el-empty__image{
width: 55px !important;
width: 45px !important;
}
::v-deep .el-empty__description{
@ -1094,7 +1184,7 @@ export default {
width: 25%;
height: 100%;
background: #FFFFFF;
border-radius: 4px;
border-radius: 10px;
border: 1px solid #EBEEF5;
@ -1225,7 +1315,7 @@ export default {
width: 74%;
height: 100%;
background: #FFFFFF;
border-radius: 4px;
border-radius: 10px;
border: 1px solid #EBEEF5;
.right_tit {
@ -1313,14 +1403,13 @@ export default {
}
.left_box {
width: 40%;
height: 95%;
width: 35%;
height: 100%;
float: left;
.map_box {
width: 100%;
height: 69%;
background: gray;
}
.bench_box {
@ -1332,9 +1421,9 @@ export default {
align-items: center;
.bench_tit {
width: 95%;
width: 100%;
display: flex;
margin: 10px 0 20px;
margin: 20px 0 20px;
.bench_num {
padding: 5px;
@ -1350,8 +1439,8 @@ export default {
}
.bench_con {
width: 95%;
height: 65%;
width: 100%;
height: 73%;
display: flex;
align-items: center;
justify-content: space-between;
@ -1360,7 +1449,7 @@ export default {
width: 25%;
height: 100%;
border-radius: 10px;
background: #efefef91;
background: #fff;
display: flex;
flex-direction: column;
align-items: center;
@ -1371,8 +1460,8 @@ export default {
}
.right_box {
width: 59%;
height: 95%;
width: 64%;
height: 100%;
float: left;
margin-left: 1%;
display: flex;
@ -1382,21 +1471,20 @@ export default {
.right_top {
width: 100%;
height: 30%;
height: 25%;
display: flex;
flex-direction: column;
.top_tit {
font-size: 20px;
font-weight: 550;
margin: 20px auto;
width: 95%;
margin-bottom: 10px;
}
.top_con {
width: 95%;
width: 100%;
height: 80%;
background: #efefef;
margin: 0 auto;
display: flex;
align-items: center;
@ -1404,8 +1492,8 @@ export default {
border-radius: 10px;
.top_container {
width: 96%;
height: 85%;
width: 100%;
height: 100%;
background: #fff;
border-radius: 10px;
@ -1440,7 +1528,7 @@ export default {
.right_bottom {
width: 100%;
height: 69%;
height: 75%;
display: flex;
flex-direction: column;
@ -1448,23 +1536,22 @@ export default {
font-size: 20px;
font-weight: 550;
margin: 20px auto;
width: 95%;
width: 100%;
}
.bottom_con {
width: 95%;
width: 100%;
height: 88%;
background: #efefef;
border-radius: 10px;
margin: 0 auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
justify-content: space-between;
.static_box {
width: 96%;
height: 46%;
width: 100%;
height: 48%;
border-radius: 10px;
background: #fff;
display: flex;

@ -1,5 +1,7 @@
<template>
<div class="map_container" id="map_box"></div>
<div class="map_container" >
<div id="map_box" style="width: 98%;height: 98%;margin: 0 auto;"></div>
</div>
</template>
<script>
@ -543,6 +545,8 @@ export default {
width:100%;
height: 100%;
color: #fff;
border-radius: 10px;
background: #fff;
}
</style>
Loading…
Cancel
Save