修改维保计划和维修列表

This commit is contained in:
龙运模 2024-09-01 16:28:15 +08:00
parent 4638a5c862
commit 39979c262a
7 changed files with 89 additions and 165 deletions

View File

@ -0,0 +1,13 @@
<template>
<svg t="1725178306887" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4680" width="200" height="200"><path d="M114.232889 1024a38.912 38.912 0 0 1-38.684445-38.741333V199.054222a38.968889 38.968889 0 0 1 38.684445-38.798222h103.992889v-21.276444a23.495111 23.495111 0 0 1 23.779555-22.471112H364.657778c6.257778-27.136 20.138667-51.939556 40.106666-71.338666a149.447111 149.447111 0 0 1 214.072889 0c19.911111 19.456 33.735111 44.202667 39.936 71.338666h123.904a22.471111 22.471111 0 0 1 22.641778 22.471112v21.276444h105.073778a37.205333 37.205333 0 0 1 37.603555 38.798222v786.204445a38.115556 38.115556 0 0 1-37.603555 38.684444L114.232889 1024z m37.603555-78.791111h721.066667V236.600889h-67.584v21.390222a22.528 22.528 0 0 1-22.584889 22.471111H242.005333a22.755556 22.755556 0 0 1-23.779555-22.471111v-21.390222H151.893333v708.608zM277.105778 223.971556h470.584889v-49.948445H277.105778v49.948445z m172.657778-135.054223c-11.264 11.264-7.566222 12.515556-13.653334 27.591111h151.324445c-4.949333-15.075556-2.446222-17.578667-12.515556-27.591111a77.027556 77.027556 0 0 0-62.577778-31.288889 80.611556 80.611556 0 0 0-62.577777 31.288889z m-31.687112 677.546667l-141.482666-141.482667a42.097778 42.097778 0 0 1 29.866666-72.021333c11.207111 0 21.959111 4.437333 29.923556 12.344889l111.388444 111.445333 216.064-216.177778A42.325333 42.325333 0 0 1 723.626667 520.533333l-245.987556 245.987556a42.097778 42.097778 0 0 1-59.676444 0z" p-id="4681"></path></svg>
</template>
<script>
export default {
name: "ConfirmOrder"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,13 @@
<template>
<svg t="1725173617858" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4537" width="200" height="200"><path d="M258.56 76.8c-28.16 0-53.76 5.12-79.36 17.92-15.36 7.68-20.48 28.16-7.68 40.96l87.04 87.04-30.72 30.72-87.04-87.04a23.267556 23.267556 0 0 0-17.92-7.68c-10.24 0-17.92 5.12-23.04 15.36a180.053333 180.053333 0 0 0 33.28 207.36c35.84 35.84 79.36 51.2 125.44 51.2 20.48 0 40.96-2.56 58.88-10.24l284.16 284.16c-23.04 64-7.68 135.68 40.96 186.88 35.84 35.84 79.36 51.2 125.44 51.2 28.16 0 53.76-5.12 79.36-17.92 15.36-7.68 20.48-28.16 7.68-40.96l-87.04-87.04 30.72-30.72 87.04 87.04c5.12 5.12 10.24 7.68 17.92 7.68 10.24 0 17.92-5.12 23.04-15.36a180.053333 180.053333 0 0 0-33.28-207.36c-35.84-35.84-79.36-51.2-125.44-51.2-20.48 0-40.96 2.56-61.44 10.24L422.4 314.88c23.04-64 7.68-135.68-40.96-186.88a172.373333 172.373333 0 0 0-122.88-51.2zM225.28 307.2c12.8 0 25.6-5.12 35.84-15.36l30.72-30.72a49.493333 49.493333 0 0 0 0-71.68L232.96 130.56c7.68 0 15.36-2.56 23.04-2.56 33.28 0 66.56 12.8 89.6 38.4 35.84 35.84 46.08 87.04 30.72 133.12-7.68 17.92-2.56 38.4 12.8 53.76l284.16 284.16c10.24 10.24 23.04 15.36 35.84 15.36 5.12 0 12.8 0 17.92-2.56 12.8-5.12 28.16-7.68 43.52-7.68 33.28 0 66.56 12.8 89.6 38.4 30.72 30.72 43.52 71.68 35.84 112.64l-58.88-58.88a50.517333 50.517333 0 0 0-35.84-15.36c-12.8 0-25.6 5.12-35.84 15.36l-30.72 30.72a50.517333 50.517333 0 0 0-15.36 35.84c0 12.8 5.12 25.6 15.36 35.84l58.88 58.88c-7.68 0-15.36 2.56-23.04 2.56-33.28 0-66.56-12.8-89.6-38.4-35.84-35.84-46.08-87.04-30.72-133.12 7.68-17.92 2.56-38.4-12.8-53.76L353.28 389.12a50.517333 50.517333 0 0 0-35.84-15.36c-5.12 0-10.24 0-17.92 2.56-12.8 5.12-28.16 7.68-43.52 7.68-33.28 0-66.56-12.8-89.6-38.4-30.72-30.72-43.52-71.68-35.84-112.64L189.44 291.84c10.24 10.24 23.04 15.36 35.84 15.36z" p-id="4538"></path><path d="M337.92 563.2c-12.743111 0-25.6 5.12-35.84 15.36l-184.32 184.32a49.493333 49.493333 0 0 0 0 71.68l71.68 71.68c10.24 10.24 23.096889 15.36 35.84 15.36 12.856889 0 25.6-5.12 35.84-15.36l184.32-184.32a49.493333 49.493333 0 0 0 0-71.68l-71.68-71.68c-7.623111-10.24-20.48-15.36-35.84-15.36z m-110.023111 307.2l-71.68-71.68 184.32-184.32 71.68 71.68-184.32 184.32zM849.92 138.24l35.84 35.84-89.6 89.6-17.92-17.92-17.92-17.92L849.92 138.24z m0-61.44a23.267556 23.267556 0 0 0-17.92 7.68L706.56 209.92c-10.24 10.24-10.24 25.6 0 35.84l17.92 17.92L599.04 389.12c-10.24 10.24-10.24 25.6 0 35.84 5.12 5.12 12.8 7.68 17.92 7.68s12.8-2.56 17.92-7.68l125.44-125.44 17.92 17.92c5.12 5.12 12.8 7.68 17.92 7.68s12.8-2.56 17.92-7.68l125.44-125.44c10.24-10.24 10.24-25.6 0-35.84l-71.68-71.68c-2.56-5.12-10.24-7.68-17.92-7.68z" p-id="4539"></path></svg>
</template>
<script>
export default {
name: "MaintenanceSetup"
}
</script>
<style scoped>
</style>

View File

@ -28,6 +28,8 @@ export { default as AgentMaintenance } from './AgentMaintenance.vue'
export { default as CostAllocation } from './CostAllocation.vue' export { default as CostAllocation } from './CostAllocation.vue'
export { default as K3Api } from './K3Api.vue' export { default as K3Api } from './K3Api.vue'
export { default as CostSetup } from './CostSetup.vue' export { default as CostSetup } from './CostSetup.vue'
export { default as MaintenanceSetup } from './MaintenanceSetup.vue'
export { default as ConfirmOrder } from './ConfirmOrder.vue'
export { default as DataSource } from './DataSource.vue' export { default as DataSource } from './DataSource.vue'
export { default as MachineRoom } from './MachineRoom.vue' export { default as MachineRoom } from './MachineRoom.vue'
export { default as CreateFolder } from './CreateFolder.vue' export { default as CreateFolder } from './CreateFolder.vue'

View File

@ -177,16 +177,13 @@
async setLoginData(user) { async setLoginData(user) {
this.$TOOL.cookie.set("TOKEN", user.data.token, { this.$TOOL.cookie.set("TOKEN", user.data.token, {
expires: this.form.autologin ? 24 * 60 * 60 : 0 expires: 0
}) })
this.$TOOL.data.set("USER_INFO", user.data.user) this.$TOOL.data.set("USER_INFO", user.data.user)
if(user.data.user.avatar!=''){ if(user.data.user.avatar!=''){
this.$store.commit("SET_LOGIN_AVATAR", user.data.user.avatar); this.$store.commit("SET_LOGIN_AVATAR", user.data.user.avatar);
} }
this.$store.commit("SET_LOGIN_NAME", user.data.user.name); this.$store.commit("SET_LOGIN_NAME", user.data.user.name);
// WebSocket
// let global_callback = function () {};
// this.$socketApi.createWebSocket(global_callback, user.data.token);
// //
let menu = null; let menu = null;
@ -243,9 +240,9 @@
userHandle:this.bufferToBase64URL(assertion.response.userHandle), userHandle:this.bufferToBase64URL(assertion.response.userHandle),
} }
} }
const res = await this.$API.system.user.verifyAuthentication.post(params); const user = await this.$API.system.user.verifyAuthentication.post(params);
if(res.code == 200){ if(user.code == 200){
await this.setLoginData(res); await this.setLoginData(user);
} }
}, },
bufferToBase64URL(buffer) { bufferToBase64URL(buffer) {

View File

@ -1,25 +1,7 @@
<template> <template>
<el-container class="mainBox mainHeaderNoBorderPadding"> <el-container class="mainBox mainBoxHeaderNoBorder">
<el-header>
<div class="left-panel">
<el-button type="primary" :size="size" icon="el-icon-plus" @click="add">新增工单</el-button>
<scImport ref="scImport" :size="size" title="批量导入维保工单" @parentParams="importUpload" @importSuccess="importSuccess">
<template #header>
<el-button v-auth="'organizationImport'" type="primary" :size="size" plain @click="importFile">批量导入</el-button>
</template>
<template #download>
<div v-auth="'companyImportTemplate'" @click="importTemplate">下载导入模版</div>
</template>
</scImport>
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<div class="searchMain searchMainNoTop"> <div class="searchMain">
<scSearch ref="scSearch" :searchList="searchList" @fetchSelectData="getSelectData"></scSearch> <scSearch ref="scSearch" :searchList="searchList" @fetchSelectData="getSelectData"></scSearch>
<div class="searchItem searchBtn"> <div class="searchItem searchBtn">
@ -49,12 +31,8 @@
<el-button class="noBorderBtn" icon="el-icon-more" :size="size"></el-button> <el-button class="noBorderBtn" icon="el-icon-more" :size="size"></el-button>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item @click="table_show(scope.row, 'see')" icon="sc-icon-See">查看详情</el-dropdown-item> <el-dropdown-item icon="sc-icon-ConfirmOrder">确认工单</el-dropdown-item>
<el-dropdown-item @click="table_edit(scope.row, 'edit')" icon="sc-icon-Edit">编辑公司</el-dropdown-item> <el-dropdown-item @click="table_show(scope.row, 'see')" icon="sc-icon-See">工单详情</el-dropdown-item>
<el-dropdown-item icon="sc-icon-AbilityAuthorization" @click="table_empower(scope.row)" divided>功能授权</el-dropdown-item>
<el-dropdown-item icon="sc-icon-DataAuthorization">数据授权</el-dropdown-item>
<el-dropdown-item icon="sc-icon-UserList" @click="table_user_ist(scope.row)" divided>用户列表</el-dropdown-item>
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-Delete">删除公司</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
@ -93,16 +71,12 @@ export default {
exportShow:false, exportShow:false,
searchShow:false, searchShow:false,
searchList:[ searchList:[
{name:'生产日期',type:'date',code:'activation_date'}, {name:'维修单号',type:'text',code:'repair_order_no', data:[], placeholder:"请输入维修单号",show:true},
{name:'反厂日期',type:'date',code:'activation_date'}, {name:'故障类型',type:'select',code:'fault_type', data:[], placeholder:"请选择故障类型",show:true},
{name:'处理时间',type:'date',code:'activation_date'}, {name:'整机型号',type:'select',code:'repair_status', data:[], placeholder:"请选择整机型号",isOpen:true,show:true},
{name:'客户名称',type:'multiple',code:'id', data:[], placeholder:"请选择公司名称",show:false}, {name:'园区名称',type:'select',code:'repair_status', data:[], placeholder:"请选择园区名称",isOpen:true,show:false},
{name:'状态',type:'select',code:'active_status', data:[], placeholder:"请选择状态",show:false}, {name:'故障描述',type:'text',code:['fault_description'],placeholder:"请输故障描述",isOpen:true,show:false},
{name:'工单号',type:'text',code:['mobile'],placeholder:"请输入手机号",isOpen:true,show:false}, {name:'关键字',type:'text',code:['fault_description','device_sn'],keyword:true,show:true},
{name:'邮件地址',type:'text',code:['email'],placeholder:"请输入邮箱地址",isOpen:true,show:false},
{name:'公司地址',type:'text',code:['address'],placeholder:"请输入公司地址",isOpen:true,show:false},
{name:'负责人',type:'text',code:['owner'],placeholder:"请输入负责人",isOpen:true,show:false},
{name:'关键字',type:'text',code:['domain','name'],keyword:true,show:true},
], ],
params: {}, params: {},
} }

View File

@ -1,24 +1,9 @@
<template> <template>
<el-container class="mainBox mainHeaderNoBorderPadding"> <el-container class="mainBox mainHeaderNoBorderPadding">
<el-header>
<div class="left-panel">
<el-button type="primary" :size="size" icon="el-icon-plus" @click="add">新增维修</el-button>
<scImport ref="scImport" :size="size" title="批量导入维修工单" @parentParams="importUpload" @importSuccess="importSuccess">
<template #header>
<el-button v-auth="'organizationImport'" type="primary" :size="size" plain @click="importFile">批量导入</el-button>
</template>
<template #download>
<div v-auth="'companyImportTemplate'" @click="importTemplate">下载导入模版</div>
</template>
</scImport>
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<div class="flowPath">
<flow :list="flowList"/>
</div>
<div class="searchMain searchMainNoTop"> <div class="searchMain searchMainNoTop">
<scSearch ref="scSearch" :searchList="searchList" @fetchSelectData="getSelectData"></scSearch> <scSearch ref="scSearch" :searchList="searchList" @fetchSelectData="getSelectData"></scSearch>
@ -41,7 +26,10 @@
</el-image> </el-image>
</template> </template>
<template #repair_status="scope"> <template #repair_status="scope">
<el-switch :size="size" v-model="scope.row.active_status" @change="changeSwitch($event, scope.row)" :loading="scope.row.$switch_status" :active-value="true" :inactive-value="false"></el-switch> <span v-for="(item,ind) in statusList" :key="ind">
<span :style="{color:item.value==1?`var(--el-order-color-1)`:item.value==2?`var(--el-order-color-2)`:item.value==3?`var(--el-order-color-3)`:item.value==4?`var(--el-order-color-4)`:`var(--el-order-color-4)`}"
v-if="item.value == scope.row.repair_status">{{item.label}}</span>
</span>
</template> </template>
<el-table-column label="操作" fixed="right" align="center" width="150"> <el-table-column label="操作" fixed="right" align="center" width="150">
<template #default="scope"> <template #default="scope">
@ -49,12 +37,8 @@
<el-button class="noBorderBtn" icon="el-icon-more" :size="size"></el-button> <el-button class="noBorderBtn" icon="el-icon-more" :size="size"></el-button>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item @click="table_show(scope.row, 'see')" icon="sc-icon-See">查看详情</el-dropdown-item> <el-dropdown-item icon="sc-icon-MaintenanceSetup">执行维修</el-dropdown-item>
<el-dropdown-item @click="table_edit(scope.row, 'edit')" icon="sc-icon-Edit">编辑公司</el-dropdown-item> <el-dropdown-item @click="table_show(scope.row, 'see')" icon="sc-icon-See">工单详情</el-dropdown-item>
<el-dropdown-item icon="sc-icon-AbilityAuthorization" @click="table_empower(scope.row)" divided>功能授权</el-dropdown-item>
<el-dropdown-item icon="sc-icon-DataAuthorization">数据授权</el-dropdown-item>
<el-dropdown-item icon="sc-icon-UserList" @click="table_user_ist(scope.row)" divided>用户列表</el-dropdown-item>
<el-dropdown-item @click="table_del(scope.row, 'delete')" icon="sc-icon-Delete">删除公司</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
@ -72,15 +56,22 @@
<script> <script>
// import saveDialog from './save' // import saveDialog from './save'
// import seeDialog from './see' // import seeDialog from './see'
import flow from '../orderList/components/flow'
export default { export default {
components: { components: {
flow,
// saveDialog, // saveDialog,
// seeDialog, // seeDialog,
}, },
data() { data() {
return { return {
size:'small', size:'small',
flowList:[
{name:'维修确认',left:false,right:true},
{name:'维修中',left:true,right:true},
{name:'维修完成',left:true,right:false},
],
dialog: { dialog: {
save: false, save: false,
show: false, show: false,
@ -93,18 +84,28 @@ export default {
exportShow:false, exportShow:false,
searchShow:false, searchShow:false,
searchList:[ searchList:[
{name:'创建日期',type:'date',code:'activation_date'}, {name:'创建日期',type:'date',code:'activation_date',show:true},
{name:'维修单号',type:'text',code:'repair_order_no', data:[], placeholder:"请输入维修单号",show:true}, {name:'维修单号',type:'text',code:'repair_order_no', data:[], placeholder:"请输入维修单号",show:true},
{name:'故障类型',type:'select',code:'fault_type', data:[], placeholder:"请选择故障类型",show:true}, {name:'故障类型',type:'select',code:'fault_type', data:[], placeholder:"请选择故障类型",show:true},
{name:'状态',type:'select',code:'repair_status', data:[], placeholder:"请选择状态",show:true}, {name:'状态',type:'select',code:'repair_status', data:[], placeholder:"请选择状态",isOpen:true,show:false},
{name:'故障描述',type:'text',code:['fault_description'],placeholder:"请输故障描述",isOpen:true,show:false}, {name:'故障描述',type:'text',code:['fault_description'],placeholder:"请输故障描述",isOpen:true,show:false},
{name:'整机SN',type:'text',code:['device_sn'],placeholder:"请输入整机SN",isOpen:true,show:false},
{name:'关键字',type:'text',code:['fault_description','device_sn'],keyword:true,show:true}, {name:'关键字',type:'text',code:['fault_description','device_sn'],keyword:true,show:true},
], ],
params: {}, params: {},
statusList:[],
} }
}, },
mounted() {
this.getStatusList();
},
methods: { methods: {
async getStatusList() {
const res = await this.$API.orders.order.maintenance.status.post();
if (res.code == 200) {
this.statusList = res.data;
}
},
searchShowClick(){ searchShowClick(){
this.searchShow = !this.searchShow; this.searchShow = !this.searchShow;
this.searchList.forEach(item=>{ this.searchList.forEach(item=>{
@ -138,16 +139,6 @@ export default {
}) })
} }
}, },
async getStatusList(data,params) {
const res = await this.$API.oss.status.post(params);
if(res.code == 200){
this.searchList.forEach(item=>{
if(item.code == data.code){
item.data = res.data;
}
})
}
},
// //
add(){ add(){
@ -157,35 +148,6 @@ export default {
}) })
}, },
//
importFile(){
this.$nextTick(()=>{
this.$refs.scImport.importFile();
})
},
async importTemplate() {
const res = await this.$API.orders.order.maintenance.template.post();
const blob = new Blob([res]);
const text = new Date().getTime();
const eLink = document.createElement('a');
eLink.download = "维保导入模版_"+text+'.xlsx';
eLink.style.display = 'none';
eLink.href = URL.createObjectURL(blob);
document.body.appendChild(eLink);
eLink.click();
URL.revokeObjectURL(eLink.href);
document.body.removeChild(eLink);
},
async importUpload(params) {
const res = await this.$API.orders.order.maintenance.import.post(params);
if(res.code == 200){
this.$message.success('上传成功,开始导入数据');
}
},
importSuccess(){
this.$refs.table.refresh()
},
// //
table_edit(row){ table_edit(row){
this.dialog.save = true this.dialog.save = true
@ -215,59 +177,12 @@ export default {
} }
}).catch(()=>{}) }).catch(()=>{})
}, },
//
table_empower(row){
this.$router.push({
path: '/setting/company/add-permission',
query: {
id: row.id,
name:row.name
}
})
},
//
table_user_ist(row){
this.$router.push({
path: '/setting/user/company-user-list',
query: {
id: row.id,
name:row.name
}
})
},
// //
selectionChange(selection){ selectionChange(selection){
this.selection = selection; this.selection = selection;
}, },
//
changeSwitch(val, row) {
row.$switch_yx = true;
setTimeout(async () => {
let params = {
id: row.id,
status: row.active_status,
};
const res = await this.$API.system.company.status.post(params);
if(res.code !=200){
row.active_status = !row.active_status;
}
delete row.$switch_status;
delete row.$switch_yx;
}, 500);
},
//
exportChangeShow(params){
if(params.type == 11){
this.exportShow = params.status==0?true:false
}
},
async exportData() {
if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){
this.$message.success('开始导出');
}
},
upSearch(){ upSearch(){
this.$refs.table.upData(this.params); this.$refs.table.upData(this.params);
}, },
@ -284,6 +199,16 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mainBox{
padding:10px 0 0 0;
.searchMain{
margin-left: 10px;
margin-right: 10px;
}
.scTable{
padding: 0 10px;
}
}
.logoCell{ .logoCell{
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -179,13 +179,13 @@
this.showGroupLoading = false; this.showGroupLoading = false;
if(res.code == 200){ if(res.code == 200){
this.group = res.data.rows; this.group = res.data.rows;
if(res.data.rows && res.data.rows.length>0){
this.role_id = res.data.rows[0].id;
if(flag){ if(flag){
await this.getMenu(); await this.getMenu();
await this.getRoleList(); await this.getRoleList();
await this.getDataList(); await this.getDataList();
} }
if(res.data.rows && res.data.rows.length>0){
this.role_id = res.data.rows[0].id;
} }
} }
}, },