测试问题修改

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. 4
      src/views/goodsManagement/goodsList.vue
  14. 4
      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' 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": "" "type": ""
}, },
{ {
"name": "", "name": "待接单",
"status": 205, "status": 205,
"color": "#f56c6c", "color": "#f56c6c",
"type": "" "type": ""
@ -532,16 +532,16 @@
"type": "" "type": ""
}, },
{ {
"name": "已驳回", "name": "待提报",
"status": 100, "status": 100,
"color": "#f56c6c", "color": "#f56c6c",
"type": "danger" "type": "danger"
}, },
{ {
"name": "已驳回", "name": "待接单",
"status": 101, "status": 101,
"color": "#f56c6c", "color": "#67c23a",
"type": "danger" "type": "success"
}, },
{ {
"name": "已驳回", "name": "已驳回",

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

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

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

@ -54,7 +54,7 @@ const user = {
menuAll: getStore({name: 'menuAll'}) || [], menuAll: getStore({name: 'menuAll'}) || [],
token: getStore({name: 'token'}) || '', token: getStore({name: 'token'}) || '',
refreshToken: getStore({name: 'refreshToken'}) || '', refreshToken: getStore({name: 'refreshToken'}) || '',
dataType:null,//数据标识权限 dataType:'',//数据标识权限
}, },
actions: { actions: {
//根据用户名登录 //根据用户名登录
@ -264,18 +264,7 @@ const user = {
if(userInfo.content.detail.status != 1){ if(userInfo.content.detail.status != 1){
data = res.data.data.filter(item => item.path == '/workbench') data = res.data.data.filter(item => item.path == '/workbench')
}else{ }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 data = res.data.data
} }
let menu = deepClone(data); let menu = deepClone(data);
@ -343,6 +332,19 @@ const user = {
if (validatenull(userInfo.avatar)) { if (validatenull(userInfo.avatar)) {
userInfo.avatar = "/img/bg/img-logo.png"; 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; state.userInfo = userInfo;
} }
setStore({name: 'userInfo', content: state.userInfo}) setStore({name: 'userInfo', content: state.userInfo})
@ -374,10 +376,7 @@ const user = {
}); });
setStore({name: 'permission', content: state.permission}) 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> @click="handleEvaluate(row)">评价</el-button>
<el-button v-show="permission.confirmpayment && row.repairStatus == 6" <el-button v-show="permission.confirmpayment && row.repairStatus == 6"
@click="paymentFinish(row)">确认付款</el-button> @click="paymentFinish(row)">确认付款</el-button>
<el-button @click="handleExport(row)">导出</el-button> <!-- <el-button @click="handleExport(row)">导出</el-button> -->
</template> </template>
</avue-crud> </avue-crud>
<el-dialog title="巡检异常维修" :visible.sync="dialogerror" :append-to-body="true" width="70%"> <el-dialog title="巡检异常维修" :visible.sync="dialogerror" :append-to-body="true" width="70%">
@ -1143,33 +1143,8 @@ export default {
}) })
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
// this.data = [ console.log('query',this.errorForm.deptName,params)
// { getRepairPage({ current: this.page.currentPage, size: this.page.pageSize,deptName:params.deptName }).then(res => {
// 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 => {
this.data = res.data.data.records this.data = res.data.data.records
this.page.total = res.data.data.total this.page.total = res.data.data.total
}) })

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

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

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

@ -20,12 +20,12 @@
<el-tag :type="row.num < row.warnNum ? 'danger' : ''">{{ row.num }}</el-tag> <el-tag :type="row.num < row.warnNum ? 'danger' : ''">{{ row.num }}</el-tag>
</template> </template>
<template slot-scope="scope" slot="menuLeft"> <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 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 size="small" @click="handleImport" type="success"> </el-button>
<el-button type="warning" size="small" @click="handleExport"> </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>
<template slot-scope="{ row }" slot="menu"> <template slot-scope="{ row }" slot="menu">
<el-button @click="handleVide(row)" v-show="permission.goodsView">查看</el-button> <el-button @click="handleVide(row)" v-show="permission.goodsView">查看</el-button>

@ -169,10 +169,12 @@ export default {
}, },
// //
onLoad(){ onLoad(){
console.log('searchForm',this.searchForm)
this.loading = true this.loading = true
let query = { let query = {
current:this.page.currentPage, current:this.page.currentPage,
size:this.page.pageSize size:this.page.pageSize,
...this.searchForm
} }
getList(query).then(res =>{ getList(query).then(res =>{
this.data = res.data.data.records this.data = res.data.data.records

@ -34,6 +34,7 @@
<el-button @click="deletePlan(row)" v-show="permission.contentDelete">删除</el-button> <el-button @click="deletePlan(row)" v-show="permission.contentDelete">删除</el-button>
<el-button @click="handleDownload(row)" <el-button @click="handleDownload(row)"
v-show="permission.contentDelete">下载</el-button> v-show="permission.contentDelete">下载</el-button>
<el-button type="primary" @click="handleExportDevice(row)">导出</el-button>
<!-- <el-button @click="handleImport(row)">导入</el-button> --> <!-- <el-button @click="handleImport(row)">导入</el-button> -->
</template> </template>
</avue-crud> </avue-crud>
@ -56,6 +57,8 @@ import { mapGetters } from "vuex";
import JSZip from 'jszip'; import JSZip from 'jszip';
import { saveAs } from 'file-saver'; import { saveAs } from 'file-saver';
import { getLimsTree, planCreate, getContentList, getPlanDetail, dealPlan, deletePlan, editPlan } from '@/api/labManagement/inspectionManagement' import { getLimsTree, planCreate, getContentList, getPlanDetail, dealPlan, deletePlan, editPlan } from '@/api/labManagement/inspectionManagement'
import { exportBlob1 } from "@/api/common";
import { downloadXls } from "@/util/util";
export default { export default {
components: { components: {
addDialog addDialog
@ -259,6 +262,12 @@ export default {
// } // }
}, },
methods: { 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 }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// console.log('row--------------->',row) // console.log('row--------------->',row)
// console.log('column--------------->',column) // console.log('column--------------->',column)

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

@ -13,28 +13,7 @@
</template> --> </template> -->
<template slot-scope="{ row }" slot="status"> <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, <el-tag :type="getStatus('maintain', role_id, row.status).type">{{ getStatus('maintain', role_id,
row.status).name row.status).name
}}</el-tag> }}</el-tag>
@ -467,10 +446,10 @@
</el-dialog> </el-dialog>
<!-- 流程日志 --> <!-- 流程日志 -->
<logDialog :orderId="logOrderId" :infoDialog="infoDialog" @closeLog="closeLog"></logDialog> <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> <requirement :detailForm="requireForm"></requirement>
</div> </div> -->
</basic-container> </basic-container>
</template> </template>
@ -488,7 +467,7 @@ import { getChildList } from '@/api/system/dictbiz'
import statusData from "@/assets/json/status.json"; // import statusData from "@/assets/json/status.json"; //
import logDialog from '../../components/order/logDialog.vue' import logDialog from '../../components/order/logDialog.vue'
import { color } from "echarts"; import { color } from "echarts";
import { exportBlob, exportBlob1 } from "@/api/common"; import { exportBlob, exportBlob1, zipDownload } from "@/api/common";
import { downloadXls } from "@/util/util"; import { downloadXls } from "@/util/util";
let action = "https://api.avuejs.com/imgupload"; let action = "https://api.avuejs.com/imgupload";
@ -821,6 +800,30 @@ export default {
this.$message.warning('请选择状态为已完成的数据') this.$message.warning('请选择状态为已完成的数据')
} else { } else {
console.log('批量导出报告', this.selectionList) 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