测试问题修改

master
zhangdi 1 year ago
parent 47c1e213b6
commit 818ec31a26
  1. BIN
      public/favicon.png
  2. 11
      src/api/common.js
  3. 10
      src/assets/json/status.json
  4. 35
      src/components/order/workOrderDialog.vue
  5. 2
      src/router/axios.js
  6. 1
      src/store/getters.js
  7. 2
      src/store/modules/common.js
  8. 33
      src/store/modules/user.js
  9. 31
      src/views/businessManagement/inspection/repair.vue
  10. 139
      src/views/businessManagement/inspection/task.vue
  11. 126
      src/views/businessManagement/ordinary.vue
  12. 5
      src/views/device/deviceSystem.vue
  13. 36
      src/views/goodsManagement/goodsList.vue
  14. 8
      src/views/goodsManagement/warehouseList.vue
  15. 9
      src/views/labManagement/inspectionManagement.vue
  16. 1
      src/views/largeScreen/supervisory.vue
  17. 55
      src/views/operation/hand.vue

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

@ -22,3 +22,14 @@ export const exportBlob1 = (url, params) => {
responseType: 'blob'
})
}
// 下载压缩包
export const zipDownload = (url, params) => {
return request({
url: url,
data: params,
method: 'post',
responseType: "blob",
// headers: { "Content-Type": "multipart/form-data" }
})
}

@ -520,7 +520,7 @@
"type": ""
},
{
"name": "",
"name": "待接单",
"status": 205,
"color": "#f56c6c",
"type": ""
@ -532,16 +532,16 @@
"type": ""
},
{
"name": "已驳回",
"name": "待提报",
"status": 100,
"color": "#f56c6c",
"type": "danger"
},
{
"name": "已驳回",
"name": "待接单",
"status": 101,
"color": "#f56c6c",
"type": "danger"
"color": "#67c23a",
"type": "success"
},
{
"name": "已驳回",

@ -15,33 +15,33 @@
</el-form-item>
<el-form-item label="故障现象描述" prop="faultDescribe">
<el-input placeholder="请输入故障现象描述" type="textarea" v-model="addForm.faultDescribe" style="width:98%;"
:disabled="dataType != '2'"></el-input>
:disabled="dataTypes != '2'"></el-input>
</el-form-item>
<el-form-item label="故障位置" prop="faultLocation">
<el-input placeholder="请输入故障位置" v-model="addForm.faultLocation" style="width:98%;"
:disabled="dataType != '2'"></el-input>
:disabled="dataTypes != '2'"></el-input>
</el-form-item>
<el-form-item label="设备名称" prop="deviceName">
<el-input style="width:98%;" placeholder="请输入设备名称" v-model="addForm.deviceName"
:disabled="dataType != '2'"></el-input>
:disabled="dataTypes != '2'"></el-input>
</el-form-item>
<el-form-item label="故障专业类型" prop="faultType">
<el-input style="width:98%;" placeholder="请输入故障专业类型" v-model="addForm.faultType"
:disabled="dataType != '2'"></el-input>
:disabled="dataTypes != '2'"></el-input>
</el-form-item>
</div>
<div>
<div class="title">派单信息</div>
<el-form-item label="维修类别" prop="repairType">
<el-select placeholder="请选择维修类别" style="width:98%;" v-model="addForm.repairType"
:disabled="dataType != '2'">
:disabled="dataTypes != '2'">
<el-option v-for="item in repairTypeList" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey"></el-option>
</el-select>
</el-form-item>
<el-form-item label="维修人员" prop="repairPerson">
<el-select placeholder="请选择维修人员" style="width:98%;" v-model="addForm.repairPerson"
:disabled="dataType != '2'">
:disabled="dataTypes != '2'">
<el-option v-for="item in repairPersonList" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
@ -50,12 +50,12 @@
<el-form-item label="计划完成时间" prop="planCompleteTime">
<el-date-picker style="width:98%;" v-model="addForm.planCompleteTime" format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss" type="date" placeholder="请选择计划完成时间" :picker-options="dispatchOptions"
:disabled="dataType != '2'">
:disabled="dataTypes != '2'">
</el-date-picker>
</el-form-item>
<el-form-item label="客服意见" prop="customerOpinion">
<el-input placeholder="请输入客服意见" type="textarea" v-model="addForm.customerOpinion" style="width:98%;"
:disabled="dataType != '2'"></el-input>
:disabled="dataTypes != '2'"></el-input>
</el-form-item>
</div>
@ -68,7 +68,7 @@
</el-dialog>
</template>
<script>
import { mapState, mapActions } from 'vuex';
import { mapState, mapActions,mapGetters } from 'vuex';
import { getChildList } from '@/api/system/dictbiz'
import {
getList, getDetail, editData, getDeptList, getRepairPeople, repairReject, submitReject, clone, serviceman, servicemanReceive, servicemanReject, servicemanSubmit, supervisorConfirm, supervisorReject,
@ -92,6 +92,7 @@ export default {
},
computed: {
...mapGetters(["userInfo", "permission"]),
...mapState({
dataType: state => state.user.dataType,
}),
@ -113,11 +114,14 @@ export default {
disabledDate(v) {
return v.getTime() < new Date().getTime() - 86400000;// - 86400000
}
}
},
dataTypes:''
}
},
mounted() {
this.dataTypes=this.userInfo.dataType
console.log(999,this.dataTypes)
this.getDetail()
//
this.getChildList('1869925082102702082', 'repairTypeList')
@ -132,7 +136,7 @@ export default {
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.dataType == '2' ? '' : res.data.data.repairPerson
this.addForm.repairPerson = this.dataTypes == '2' ? '' : res.data.data.repairPerson
this.addForm = {
...this.addForm,
isNeedMaterials: 2,
@ -148,7 +152,7 @@ export default {
if (valid) {
let query = {}
//
if (this.dataType == '2') {
if (this.dataTypes == '2') {
query = {
id: this.addForm.id,
reportUnit: this.addForm.reportUnit,
@ -160,7 +164,7 @@ export default {
}
let manQuery = {
id: this.addForm.id,
repairPerson: this.dataType == '2' ? this.addForm.repairPerson : null,
repairPerson: this.dataTypes == '2' ? this.addForm.repairPerson : null,
planCompleteTime: this.addForm.planCompleteTime,
dispatchTime: moment().format('YYYY-MM-DD HH:mm:ss'),
customerOpinion: this.addForm.customerOpinion,
@ -183,7 +187,7 @@ export default {
},
//
handleClose() {
this.$emit('closeWorkOrder')
},
//
getRepairPeople() {
@ -196,6 +200,9 @@ export default {
getChildList(1, 100, id).then(res => {
if (type == 'repairTypeList') {
this.repairTypeList = res.data.data
this.repairTypeList.forEach(item=>{
item.dictKey=Number(item.dictKey)
})
}
})
},

@ -23,7 +23,7 @@ import crypto from '@/util/crypto';
let isErrorShown = false;
//默认超时时间
axios.defaults.timeout = 10000;
axios.defaults.timeout = 600000;
//返回其他状态码
axios.defaults.validateStatus = function (status) {
return status >= 200 && status <= 500;

@ -26,6 +26,5 @@ const getters = {
logsFlag: (state, getters) => getters.logsLen === 0,
flowRoutes: state => state.dict.flowRoutes,
messageTotal: state => state.dict.messageTotal,
dataType: state => state.user.dataType,
}
export default getters

@ -32,8 +32,6 @@ const common = {
},
mutations: {
SET_MESSAGETOTAL: (state, active) => {
console.log('state',state)
console.log('active',active)
state.messageTotal = active;
},
SET_LANGUAGE: (state, language) => {

@ -54,7 +54,7 @@ const user = {
menuAll: getStore({name: 'menuAll'}) || [],
token: getStore({name: 'token'}) || '',
refreshToken: getStore({name: 'refreshToken'}) || '',
dataType:null,//数据标识权限
dataType:'',//数据标识权限
},
actions: {
//根据用户名登录
@ -264,18 +264,7 @@ const user = {
if(userInfo.content.detail.status != 1){
data = res.data.data.filter(item => item.path == '/workbench')
}else{
if (userInfo.content.role_id == "1123598816738675201" || userInfo.content.role_id == "1846419477876510721") {
commit('updateDatatype', 1) //客户
}
if (userInfo.content.role_id == "1839536982874193922") {
commit('updateDatatype', 2) //客服
}
if (userInfo.content.role_id == "1839537055389515777") {
commit('updateDatatype', 3) //维修负责人
}
if (userInfo.content.role_id == "1839552581620793346") {
commit('updateDatatype', 4) //维修人员
}
data = res.data.data
}
let menu = deepClone(data);
@ -343,6 +332,19 @@ const user = {
if (validatenull(userInfo.avatar)) {
userInfo.avatar = "/img/bg/img-logo.png";
}
if (userInfo.role_id == "1123598816738675201" || userInfo.role_id == "1846419477876510721") {
userInfo.dataType=1//客户
}
if (userInfo.role_id == "1839536982874193922") {
userInfo.dataType=2 //客服
}
if (userInfo.role_id == "1839537055389515777") {
userInfo.dataType=3 //维修负责人
}
if (userInfo.role_id == "1839552581620793346") {
userInfo.dataType=4 //维修人员
}
state.userInfo = userInfo;
}
setStore({name: 'userInfo', content: state.userInfo})
@ -374,10 +376,7 @@ const user = {
});
setStore({name: 'permission', content: state.permission})
},
updateDatatype(state, data) {
console.log(888888,data)
state.dataType = data
}
}
}

@ -25,7 +25,7 @@
@click="handleEvaluate(row)">评价</el-button>
<el-button v-show="permission.confirmpayment && row.repairStatus == 6"
@click="paymentFinish(row)">确认付款</el-button>
<el-button @click="handleExport(row)">导出</el-button>
<!-- <el-button @click="handleExport(row)">导出</el-button> -->
</template>
</avue-crud>
<el-dialog title="巡检异常维修" :visible.sync="dialogerror" :append-to-body="true" width="70%">
@ -1143,33 +1143,8 @@ export default {
})
},
onLoad(page, params = {}) {
// this.data = [
// {
// taskNo:'WX-20240820-01',
// unitName:'',
// inspectionName:'',
// projectAddr:'',
// inspectionFloor:'',
// status:0,
// tableData:[
// {floorName:'',floorId:'001',roomName:'',roomId:'003',majorName:'',inspectionContent:'1',status:'1',price:100,isRepair:1},
// {floorName:'',floorId:'002',roomName:'',roomId:'004',majorName:'',inspectionContent:'1',status:'1',price:100,isRepair:1}
// ]
// },
// {
// taskNo:'WX-20240820-01',
// unitName:'',
// inspectionName:'',
// projectAddr:'',
// inspectionFloor:'',
// status:1,
// tableData:[
// {floorName:'',floorId:'001',roomName:'',roomId:'003',majorName:'',inspectionContent:'1',status:'1',price:100,isRepair:1},
// {floorName:'',floorId:'002',roomName:'',roomId:'004',majorName:'',inspectionContent:'1',status:'1',price:100,isRepair:1}
// ]
// }
// ]
getRepairPage({ current: this.page.currentPage, size: this.page.pageSize }).then(res => {
console.log('query',this.errorForm.deptName,params)
getRepairPage({ current: this.page.currentPage, size: this.page.pageSize,deptName:params.deptName }).then(res => {
this.data = res.data.data.records
this.page.total = res.data.data.total
})

@ -6,7 +6,7 @@
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
<template slot-scope="scope" slot="menuLeft">
<el-button type="primary" size="small" @click="createTask">生成巡检任务</el-button>
<el-button type="primary" size="small" @click="allExportReport">批量导出报告</el-button>
<el-button type="primary" size="small" @click="allExportReport">批量导出报告</el-button>
</template>
<template slot-scope="{ row }" slot="taskStatus">
<!-- role_id 运维主管 1839537055389515777 维修人员 1839552581620793346 实验室管理员 1846419477876510721-->
@ -388,9 +388,9 @@
<el-dialog title="图片查看" :visible.sync="dialogImage" :append-to-body="true" width="70%" @close="closeImg">
<img :src="imgUrl" alt="">
</el-dialog>
<div id="pdfDom" style="padding: 20px;" v-if="routingFormShow">
<!-- <div id="pdfDom" style="padding:20px" v-if="routingFormShow">
<routing-inspection v-if="routingFormShow" :detailForm="routingForm" detailType="task"></routing-inspection>
</div>
</div> -->
</basic-container>
</template>
@ -408,8 +408,9 @@ import {
import { mapGetters } from "vuex";
import { getDeviceList } from '@/api/device/device'
import routingInspection from '@/views/components/routingInspection.vue'
import { exportBlob, exportBlob1 } from "@/api/common";
import { exportBlob1,zipDownload } from "@/api/common";
import { downloadXls } from "@/util/util";
export default {
components: {
routingInspection
@ -594,8 +595,8 @@ export default {
},
methods: {
//
allExportReport() {
//
allExportReport() {
if (this.selectedList.length == 0) {
this.$message.warning('请至少选择一条数据')
} else {
@ -604,6 +605,27 @@ export default {
this.$message.warning('请选择状态为已完成的数据')
} else {
console.log('批量导出报告', this.selectedList)
zipDownload('/api/lab-ops/maintenance/batch-maintenance-output-service', this.selectedList)
.then((response) => {
const blob = new Blob([response.data])
const fileName = '巡检报告.zip'
if ('download' in document.createElement('a')) { // IE
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)// URL
document.body.removeChild(elink)
} else { // IE10+
navigator.msSaveBlob(blob, fileName)
}
})
.catch((err) => {
console.log(err);
});
}
}
},
@ -623,59 +645,64 @@ export default {
// exportBlob1(`/api/lab-ops/maintenance/task-detail-configuration`, { id: this.inspectionForm.id }).then(res => {
//
// })
let query = JSON.parse(JSON.stringify(row))
exportBlob1(`/api/lab-ops/maintenance/maintenance-plan-report`, query).then(res => {
downloadXls(res.data, "巡检计划.xlsx");
})
getDetail({ id: row.id }).then(res => {
const header = ["deviceName", "address", "checkContent", "craft", "period", "remark"]
//
const headerDisplay = { deviceName: "专业", address: '点位', checkContent: "巡检内容", craft: '巡检工艺', period: '巡检频次', remark: '备注' };
let data = []
let data2 = []
let oldData = this.checkDeepData(res.data.data.details)
oldData.forEach(item => {
data2.push([item.floorName, item.deptName, item.deviceName,1, item.checkContent, item.craft, this.periodArr.filter(v => v.dictKey == item.period)[0].dictValue, item.remark])
// const header = ["deviceName", "address", "checkContent", "craft", "period", "remark"]
// //
// const headerDisplay = { deviceName: "", address: '', checkContent: "", craft: '', period: '', remark: '' };
data.push({
deviceName: item.deviceName,
address: item.floorName + '/' + item.deptName,
checkContent: item.checkContent,
craft: item.craft,
period: this.periodArr.filter(v => v.dictKey == item.period)[0].dictValue,
remark: item.remark
})
})
// let data = []
// let data2 = []
// let oldData = this.checkDeepData(res.data.data.details)
// oldData.forEach(item => {
// data2.push([item.floorName, item.deptName, item.deviceName,1, item.checkContent, item.craft, this.periodArr.filter(v => v.dictKey == item.period)[0].dictValue, item.remark])
let newData = [headerDisplay, ...data]
// data.push({
// deviceName: item.deviceName,
// address: item.floorName + '/' + item.deptName,
// checkContent: item.checkContent,
// craft: item.craft,
// period: this.periodArr.filter(v => v.dictKey == item.period)[0].dictValue,
// remark: item.remark
// })
// })
// 簿
const ws = XLSX.utils.json_to_sheet(newData, { header: header, skipHeader: true });
// let newData = [headerDisplay, ...data]
// // 簿
// const ws = XLSX.utils.json_to_sheet(newData, { header: header, skipHeader: true });
// 簿
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, "点检任务");
// sheet2
const sheet2Data = [
["楼层", "房间", "设备名称", "数量", "维保内容及频次", "巡检工艺", "巡检频次", "备注"],
];
data2.forEach(i => {
sheet2Data.push(i)
})
const sheet2 = XLSX.utils.aoa_to_sheet(sheet2Data);
XLSX.utils.book_append_sheet(wb, sheet2, res.data.data.deptName + '维保计划');
// // 簿
// const wb = XLSX.utils.book_new();
// XLSX.utils.book_append_sheet(wb, ws, "");
// Excel
const wbout = XLSX.write(wb, { bookType: "xlsx", type: "binary" });
// ArrayBuffer
function s2ab(s) {
const buf = new ArrayBuffer(s.length);
const view = new Uint8Array(buf);
for (let i = 0; i !== s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
return buf;
}
downloadXls(new Blob([s2ab(wbout)]), res.data.data.deptName + "维保计划.xlsx");
// // sheet2
// const sheet2Data = [
// ["", "", "", "", "", "", "", ""],
// ];
// data2.forEach(i => {
// sheet2Data.push(i)
// })
// const sheet2 = XLSX.utils.aoa_to_sheet(sheet2Data);
// XLSX.utils.book_append_sheet(wb, sheet2, res.data.data.deptName + '');
// // Excel
// const wbout = XLSX.write(wb, { bookType: "xlsx", type: "binary" });
// // ArrayBuffer
// function s2ab(s) {
// const buf = new ArrayBuffer(s.length);
// const view = new Uint8Array(buf);
// for (let i = 0; i !== s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
// return buf;
// }
// downloadXls(new Blob([s2ab(wbout)]), res.data.data.deptName + ".xlsx");
// maintenance-plan-report
})
},
//
@ -1033,7 +1060,7 @@ export default {
console.log('tableData------->', this.inspectionForm.tableData)
})
},
//
//
handleExport(row) {
getDetail({ id: row.id }).then(res => {
@ -1042,10 +1069,14 @@ export default {
this.routingForm.tableData.map(item => {
item.price = item.price != -1 ? item.price : ''
})
this.routingFormShow = true
setTimeout(() => {
this.getPdf()
}, 100)
// this.routingFormShow = true
let query = JSON.parse(JSON.stringify(row))
exportBlob1(`/api/lab-ops/maintenance/maintenance-output-service`, query).then(res => {
downloadXls(res.data, "巡检报告.xlsx");
})
// setTimeout(() => {
// this.getPdf()
// }, 100)
})
},
handleInspection(row) {

@ -22,18 +22,18 @@
getStatus('maintain', role_id, row.status).name }}</el-tag>
</template>
<template slot-scope="scope" slot="menuLeft">
<el-button type="primary" size="small" @click="handleAccept" v-show="role_id != '1839600115013713921'">{{
<!-- <el-button type="primary" size="small" @click="handleAccept" v-show="role_id != '1839600115013713921'">{{
role_id
== '1839552581620793346' ? '接单确认' : '接单' }}</el-button>
== '1839552581620793346' ? '接单确认' : '接单' }}</el-button> -->
<el-button type="primary" size="small" @click="handleApproval"
v-show="role_id == '1839600115013713921'">审批</el-button>
<el-button type="primary" size="small" @click="allExportReport">批量导出报告</el-button>
<el-button type="primary" size="small" @click="allExportReport">批量导出报告</el-button>
</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 == 101 || row.status == 400)"
<el-button v-show="permission.ordinaryOrder && (row.status == 101 || row.status == 400 || row.status == 205)"
@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>
@ -47,9 +47,10 @@
@click="handleRepairFinish(row)">维修完成</el-button>
<el-button v-show="permission.ordinarySubmit && (row.status == 401 || row.status == 300 || row.status == 105)"
@click="handleRepair(row)">提交</el-button>
<el-button v-show="permission.ordinaryPay&&row.status == 104" @click="handlePayment(row)">确认付款</el-button>
<el-button @click="handleExport(row)" v-show="row.status == 202||row.status == 203||row.status == 204">报告</el-button>
<el-button @click="viewLog(row)" >日志</el-button>
<el-button v-show="permission.ordinaryPay && row.status == 104" @click="handlePayment(row)">确认付款</el-button>
<el-button @click="handleExport(row)"
v-show="row.status == 202 || row.status == 203 || row.status == 204">报告</el-button>
<el-button @click="viewLog(row)">日志</el-button>
</template>
</avue-crud>
@ -209,7 +210,7 @@
</el-date-picker>
</el-form-item>
</div>
<div v-show="repairForm.closeReason == ''">
<div v-show="repairForm.status != 100 && repairForm.status != 101">
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">处理情况</div>
<el-form-item label="接单时间" prop="dispatchTime">
<el-date-picker v-model="repairForm.dispatchTime" type="datetime" disabled style="width:98%;"
@ -228,7 +229,7 @@
</el-form-item>
</div>
<div
v-show="(repairForm.status == 105||repairForm.status == 401 || repairForm.status == 402 || repairForm.status == 403 || repairForm.status == 301 || repairForm.status == 300 || repairForm.status == 102 || repairForm.status == 103 || repairForm.status == 104)">
v-show="(repairForm.status == 105 || 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="请输入维修人"
@ -592,9 +593,9 @@
</span>
</el-dialog>
<!-- 报告导出页面 -->
<div id="pdfDom" style="padding: 20px;">
<!-- <div id="pdfDom" style="padding:10px;">
<requirement :detailForm="requireForm"></requirement>
</div>
</div> -->
<!-- 流程弹框 -->
<logDialog :orderId="logOrderId" :infoDialog="infoDialog" @closeLog="closeLog"></logDialog>
<!-- 工单处理弹框 -->
@ -622,6 +623,8 @@ import {
import { getGoodsList } from '@/api/goodsManagement/goods'
import logDialog from '../../components/order/logDialog.vue'
import workOrderDialog from '../../components/order/workOrderDialog.vue'
import { exportBlob, exportBlob1 } from "@/api/common";
import { downloadXls } from "@/util/util";
export default {
components: {
requestSub,
@ -736,15 +739,15 @@ export default {
labelWidth: 120,
prop: "faultType",
overHidden: true,
type: "select",
searchLabelWidth: 100,
search: true,
viewDisplay: false,
dicUrl: '/api/blade-system/dict-biz/child-list?current=1&size=100&parentId=1846802246527463425',
props: {
label: "dictValue",
value: "dictValue",
},
// type: "select",
// searchLabelWidth: 100,
// search: true,
// viewDisplay: false,
// dicUrl: '/api/blade-system/dict-biz/child-list?current=1&size=100&parentId=1846802246527463425',
// props: {
// label: "dictValue",
// value: "dictValue",
// },
},
{
label: "故障专业描述",
@ -826,13 +829,13 @@ export default {
infoDialog: false,//
workOrderShow: false,//
workOrderId: '',//id
dataTypes:''
}
},
computed: {
...mapGetters(["userInfo", "permission"]),
...mapState({
dataType: state => state.user.dataType,
}),
getStatus() {
return (type, id, status) => {
for (let i in statusData[type]) {
@ -858,14 +861,18 @@ export default {
//
getChildList(1, 100, '1869925082102702082').then(res => {
this.repairTypeList = res.data.data
this.repairTypeList.forEach(item=>{
item.dictKey=Number(item.dictKey)
})
})
this.getGoodsList()
this.getProductLists()
},
mounted() {
this.role_id = this.userInfo.role_id
this.dataTypes=this.userInfo.dataType
//
getRepairPeople({ isRepair: this.role_id == '1839537055389515777' ? true : false }).then(res => {
getRepairPeople().then(res => {
this.repairPersonList = res.data.data
})
this.option.column.find(item => item.prop == 'finishTime').hide = false
@ -884,11 +891,15 @@ export default {
this.option.column.find(item => item.prop == 'finishTime').hide = true
this.option.column.find(item => item.prop == 'approveTime').hide = false
}
this.onLoad()
this.$nextTick(() => {
this.onLoad()
})
},
methods: {
//
allExportReport() {
//
allExportReport() {
if (this.selectList.length == 0) {
this.$message.warning('请至少选择一条数据')
} else {
@ -896,7 +907,27 @@ export default {
if (tmp.length != this.selectList.length) {
this.$message.warning('请选择状态为已完成的数据')
} else {
console.log('批量导出报告', this.selectList)
zipDownload('/api/lab-ops/work-order/batch-report-service', this.selectList)
.then((response) => {
const blob = new Blob([response.data])
const fileName = '运维服务单.zip'
if ('download' in document.createElement('a')) { // IE
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)// URL
document.body.removeChild(elink)
} else { // IE10+
navigator.msSaveBlob(blob, fileName)
}
})
.catch((err) => {
console.log(err);
});
}
}
},
@ -1079,7 +1110,7 @@ export default {
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.deviceId = this.repairForm.deviceId == -1 ? '' : this.repairForm.deviceId
this.repairForm.isNeedMaterial = (this.repairForm.status == 201 || this.repairForm.status == 401 || this.repairForm.status == 402|| this.repairForm.status == 105) && this.repairForm.isNeedMaterial == -1 ? '' : this.repairForm.isNeedMaterial
this.repairForm.isNeedMaterial = (this.repairForm.status == 201 || this.repairForm.status == 401 || this.repairForm.status == 402 || this.repairForm.status == 105) && this.repairForm.isNeedMaterial == -1 ? '' : this.repairForm.isNeedMaterial
this.getDeviceList(res.data.data.createDept)
if (this.repairForm.isNeedMaterial != '') {
@ -1140,13 +1171,18 @@ export default {
})
},
handleExport(row) {
getDetail({ id: row.id }).then(res => {
this.requireForm = res.data.data
// this.getPdf()
setTimeout(() => {
this.getPdf()
}, 100)
let query = JSON.parse(JSON.stringify(row))
exportBlob1(`/api/lab-ops/work-order/report-service`, query).then(res => {
downloadXls(res.data, "运维服务单.xlsx");
})
// getDetail({ id: row.id }).then(res => {
// this.requireForm = res.data.data
// // this.getPdf()
// setTimeout(() => {
// this.getPdf()
// }, 100)
// })
},
//
handleRepairFinish(row) {
@ -1410,7 +1446,7 @@ export default {
this.$message.warning('请选择一条数据')
} else if (this.selectList.length > 1) {
this.$message.warning('只能选择一条数据')
} else if (this.selectList[0].status != 2) {
} else if (this.selectList[0].status != 100) {
this.$message.warning('只能选择状态为待确认的数据')
} else {
this.dialogTitle = '工单'
@ -1457,7 +1493,7 @@ export default {
handleRepairConfirm() {
this.$refs.repairForm.validate(valid => {
if (valid) {
if (this.repairForm.status == 105 ||this.repairForm.status == 401 || this.repairForm.status == 300) {
if (this.repairForm.status == 105 || this.repairForm.status == 401 || this.repairForm.status == 300) {
if (this.repairForm.isNeedMaterial == '1') {
if (this.tableData.length == 0) {
this.$message.error('请至少填写一条维修材料信息')
@ -1486,10 +1522,10 @@ export default {
materials: data
}
//
if(this.repairForm.repairType==1){
query.discountPrice=data.reduce((sum, item) => sum + item.materialPrice, 0)
query.totalPrice=data.reduce((sum, item) => sum + item.materialPrice, 0)
query.discount=0
if (this.repairForm.repairType == 1) {
query.discountPrice = data.reduce((sum, item) => sum + item.materialPrice, 0)
query.totalPrice = data.reduce((sum, item) => sum + item.materialPrice, 0)
query.discount = 0
}
editData(query).then(res => {
@ -1498,7 +1534,7 @@ export default {
id: this.repairForm.id,
deviceId: this.repairForm.deviceId,
deviceName: this.repairForm.deviceName,
repairType:this.repairForm.repairType
repairType: this.repairForm.repairType
}).then(res => {
this.$message.success("提交成功")
this.repairVisible = false
@ -1652,7 +1688,7 @@ export default {
if (valid) {
let query = {}
//
if (this.dataType == '2') {
if (this.dataTypes == '2') {
query = {
id: this.addForm.id,
reportUnit: this.addForm.reportUnit,
@ -1670,7 +1706,6 @@ export default {
remark: this.addForm.remark,
repairType: this.addForm.repairType
}
console.log(1111111111, manQuery)
// editData(query).then(res => {
// if (res.data.code == 200) {
// serviceman(manQuery).then(result => {
@ -1779,6 +1814,7 @@ export default {
this.selectList = selection
},
onLoad(page, params = {}) {
console.log(6666,this.dataTypes)
let query = {
current: this.page.currentPage, //
size: this.page.pageSize, //
@ -1786,7 +1822,7 @@ export default {
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.dataTypes
}
getList(query).then(res => {
let data_ = res.data.data.records

@ -559,10 +559,15 @@ export default {
})
//
getChildList(1, 100, '1869925082102702082').then(res => {
console.log(111111,res.data.data)
this.repairTypeList = res.data.data
this.repairTypeList.forEach(item=>{
item.dictKey=Number(item.dictKey)
})
})
//
getRepairPeople({ isRepair: this.role_id == '1839537055389515777' ? true : false }).then(res => {
this.repairPersonList = res.data.data
})
this.onLoad()

@ -20,12 +20,12 @@
<el-tag :type="row.num < row.warnNum ? 'danger' : ''">{{ row.num }}</el-tag>
</template>
<template slot-scope="scope" slot="menuLeft">
<el-button type="primary" size="small" @click="handleAdd" v-show="permission.goodsAdd"> </el-button>
<!-- <el-button type="primary" size="small" @click="handleAdd" v-show="permission.goodsAdd"> </el-button> -->
<!-- <el-button type="primary" size="small" @click="handleReceive" v-show="permission.goodsReceive"> </el-button> -->
<el-button type="primary" size="small" @click="handleReceive" v-show="permission.goodsReceive"> </el-button>
<el-button size="small" @click="handleImport" type="success"> </el-button>
<el-button type="warning" size="small" @click="handleExport"> </el-button>
<el-button type="primary" size="small" @click="handleAddGoods" v-show="permission.goodsBuy"> </el-button>
<el-button type="primary" size="small" @click="handleAddGoods" v-show="permission.goodsBuy">采购入库</el-button>
</template>
<template slot-scope="{ row }" slot="menu">
<el-button @click="handleVide(row)" v-show="permission.goodsView">查看</el-button>
@ -167,7 +167,7 @@
</el-form-item>
<el-form-item label="物品大类" prop="bigClassId">
<SelectTree
:disabled="viewType == 'view' || isSelected"
:disabled="viewType == 'view' || isSelected"
:defaultProps="defaultProps"
style="width: 97%;"
ref="childTree"
@ -226,7 +226,7 @@
<el-button type="primary" v-show="viewType != 'view'" @click="handleSaveGoods"> </el-button>
</span>
</el-dialog>
<el-dialog
<el-dialog
title="预警设置"
:visible.sync="dialogWarning"
:append-to-body="true"
@ -541,8 +541,8 @@ export default {
})
this.getGoodsLists()
})
},
methods:{
changeWare(val){
@ -560,7 +560,7 @@ export default {
if(this.warehouseCurrent == 1){
this.warehouseList = res.data.data.records
}else{
this.warehouseList = this.warehouseList.concat(res.data.data.records)
this.warehouseList = this.warehouseList.concat(res.data.data.records)
}
this.warehouseTotal = res.data.data.total
})
@ -600,7 +600,7 @@ export default {
if(this.goodsCurrent == 1){
this.goodsList = res.data.data.records
}else{
this.goodsList = this.goodsList.concat(res.data.data.records)
this.goodsList = this.goodsList.concat(res.data.data.records)
}
this.goodsTotal = res.data.data.total
})
@ -670,9 +670,9 @@ export default {
brand:item.brand, //
model: item.xh, //
parameter:item.rule, //
count:0, //
count:0, //
goodsNumber:item.num, //
returnTime:''
returnTime:''
})
})
this.receiveForm.applyUser = this.userInfo.user_name
@ -702,9 +702,9 @@ export default {
this.addForm = {
bigClassId:{node: undefined, data: {}},
num:0
}
}
}
},
//
handlePurchase(){
@ -820,7 +820,7 @@ export default {
})
}
}
}
}
}
})
},
@ -866,7 +866,7 @@ export default {
brand:row.brand, //
model: row.xh, //
parameter:row.rule, //
count:0, //
count:0, //
goodsNumber:row.num, //
returnTime:'' //
})
@ -964,7 +964,7 @@ export default {
}
})
}
},
//
changeCount(row,currentValue){
@ -1014,7 +1014,7 @@ export default {
}
}
})
},
//
cancelrRceive(){
@ -1028,7 +1028,7 @@ export default {
name:this.searchForm.name ? this.searchForm.name : null,
bigClassId:this.searchForm.bigClassId ? this.searchForm.bigClassId : null,
current:this.page.currentPage, //
size:this.page.pageSize,
size:this.page.pageSize,
}
getGoodsList(query).then(res =>{
this.data = res.data.data.records
@ -1069,4 +1069,4 @@ export default {
justify-content: center;
}
}
</style>
</style>

@ -1,7 +1,7 @@
<template>
<basic-container style="max-height: 800px; overflow: hidden">
<avue-crud :option="option" :table-loading="loading" :data="data" :search.sync="searchForm" :page.sync="page"
ref="crud" v-model="form" :permission="permissionList"
ref="crud" v-model="form" :permission="permissionList"
@search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
@size-change="sizeChange" @refresh-change="refreshChange" @selection-change="selectionChange" @on-load="onLoad">
<template slot-scope="{row}" slot="produceTime">
@ -169,10 +169,12 @@ export default {
},
//
onLoad(){
console.log('searchForm',this.searchForm)
this.loading = true
let query = {
current:this.page.currentPage,
size:this.page.pageSize
size:this.page.pageSize,
...this.searchForm
}
getList(query).then(res =>{
this.data = res.data.data.records
@ -286,4 +288,4 @@ export default {
<style>
</style>
</style>

@ -34,6 +34,7 @@
<el-button @click="deletePlan(row)" v-show="permission.contentDelete">删除</el-button>
<el-button @click="handleDownload(row)"
v-show="permission.contentDelete">下载</el-button>
<el-button type="primary" @click="handleExportDevice(row)">导出</el-button>
<!-- <el-button @click="handleImport(row)">导入</el-button> -->
</template>
</avue-crud>
@ -56,6 +57,8 @@ import { mapGetters } from "vuex";
import JSZip from 'jszip';
import { saveAs } from 'file-saver';
import { getLimsTree, planCreate, getContentList, getPlanDetail, dealPlan, deletePlan, editPlan } from '@/api/labManagement/inspectionManagement'
import { exportBlob1 } from "@/api/common";
import { downloadXls } from "@/util/util";
export default {
components: {
addDialog
@ -259,6 +262,12 @@ export default {
// }
},
methods: {
handleExportDevice(row) {
let query = JSON.parse(JSON.stringify(row))
exportBlob1(`/api/lab-ops/maintenance/maintenance-plan-report`, query).then(res => {
downloadXls(res.data, "巡检计划.xlsx");
})
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// console.log('row--------------->',row)
// console.log('column--------------->',column)

@ -1253,6 +1253,7 @@ export default {
right: 0;
top: 0;
opacity: 0;
z-index: 22
}
img {

@ -13,28 +13,7 @@
</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 ? ''
: (row.status == 0 || row.status == 9 || row.status == 6 || row.status == 7) ? 'success'
: (row.status == 1 || row.status == 5 ) ? 'warning'
: row.status == 4 ? 'success'
: (row.status == 8 && row.totalPrice < 0) ? 'info'
: (row.status == 8 && row.totalPrice > 0) ? 'warning'
: ''">
{{
row.status == -1 ? '待提报'
: row.status == 0 ? "待接单"
: (row.status == 1 || row.status == 2 || row.status == 3) ? "待维修"
: row.status == 4 ? "确认方案"
: row.status == 5 ? '维修中'
: row.status == 6 ? '待评价'
: row.status == 7 ? '待付款'
: (row.status == 8 && row.totalPrice < 0) ? '已完成'
: (row.status == 8 && row.totalPrice > 0) ? '待开发票'
: row.status == 9 ? '已开发票'
: ""
}}
</el-tag> -->
<el-tag :type="getStatus('maintain', role_id, row.status).type">{{ getStatus('maintain', role_id,
row.status).name
}}</el-tag>
@ -467,10 +446,10 @@
</el-dialog>
<!-- 流程日志 -->
<logDialog :orderId="logOrderId" :infoDialog="infoDialog" @closeLog="closeLog"></logDialog>
<div id="pdfDom" v-if="pdfDomShow" style="padding: 20px;">
<!--
<div id="pdfDom" v-show="pdfDomShow" style="padding:20px">
<requirement :detailForm="requireForm"></requirement>
</div>
</div> -->
</basic-container>
</template>
@ -488,7 +467,7 @@ import { getChildList } from '@/api/system/dictbiz'
import statusData from "@/assets/json/status.json"; //
import logDialog from '../../components/order/logDialog.vue'
import { color } from "echarts";
import { exportBlob, exportBlob1 } from "@/api/common";
import { exportBlob, exportBlob1, zipDownload } from "@/api/common";
import { downloadXls } from "@/util/util";
let action = "https://api.avuejs.com/imgupload";
@ -821,6 +800,30 @@ export default {
this.$message.warning('请选择状态为已完成的数据')
} else {
console.log('批量导出报告', this.selectionList)
let query = {
workOrderList: this.selectionList
}
zipDownload('/api/lab-ops/work-order/batch-report-service', this.selectionList)
.then((response) => {
const blob = new Blob([response.data])
const fileName = '运维服务单.zip'
if ('download' in document.createElement('a')) { // IE
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)// URL
document.body.removeChild(elink)
} else { // IE10+
navigator.msSaveBlob(blob, fileName)
}
})
.catch((err) => {
console.log(err);
});
}
}
},

Loading…
Cancel
Save