Compare commits

..

10 Commits

Author SHA1 Message Date
龙运模
4812bebdc9 增加导出记录 2025-08-04 15:57:15 +08:00
龙运模
3487cf2827 修改检索下拉问题 2025-08-02 10:25:58 +08:00
龙运模
1dd7b9ab75 修改导出完成没重置状态、检索时间删除报错 2025-08-01 20:30:50 +08:00
龙运模
5bf7f7bf55 备件故障率配置修改 2025-08-01 19:28:45 +08:00
龙运模
82db51f9c9 禁止邮件修改 2025-07-31 21:44:40 +08:00
龙运模
083a112e95 替换导入数据接收方式sse 2025-07-31 15:09:41 +08:00
龙运模
0496907995 修改预警管理头部名字 2025-07-29 15:17:35 +08:00
龙运模
1eff12a454 注释第三方授权登录 2025-07-28 20:31:17 +08:00
龙运模
f7406250b1 修改导出问题、检索重新按时间排序 2025-07-28 16:58:56 +08:00
龙运模
fba81eb17e 更换环境 2025-07-26 17:12:31 +08:00
42 changed files with 373 additions and 35 deletions

View File

@ -5,15 +5,18 @@ NODE_ENV = production
VUE_APP_TITLE = 象纬云科
# 测试环境
# VUE_APP_API_BASEURL = https://dev.api.linkwing.com/api/v1
# VUE_APP_API_DEV = https://dev.api.linkwing.com/api/v1
# VUE_APP_WS_URL = wss://dev.api.linkwing.com/wss
# VUE_APP_WSS_URL = wss://dev.api.linkwing.com/wss
VUE_APP_API_BASEURL = https://dev.api.linkwing.com/api/v1
VUE_APP_API_DEV = https://dev.api.linkwing.com/api/v1
VUE_APP_WS_URL = wss://dev.api.linkwing.com/wss
VUE_APP_WSS_URL = wss://dev.api.linkwing.com/wss
# 线上环境
# 接口地址 # WS地址
VUE_APP_API_BASEURL = https://prod.api.linkwing.com/api/v1
VUE_APP_API_DEV = https://prod.api.linkwing.com/api/v1
VUE_APP_WS_URL = wss://prod.api.linkwing.com/wss
VUE_APP_WSS_URL = wss://prod.api.linkwing.com/wss
# VUE_APP_API_BASEURL = https://prod.api.linkwing.com/api/v1
# VUE_APP_API_DEV = https://prod.api.linkwing.com/api/v1
# VUE_APP_WS_URL = wss://prod.api.linkwing.com/wss
# VUE_APP_WSS_URL = wss://prod.api.linkwing.com/wss
# SSE地址
VUE_APP_SSE_URL = https://dev.api.linkwing.com/sse/stream

View File

@ -100,6 +100,13 @@ export default {
return await http.post(this.url, params);
},
},
record:{
url: `${config.API_URL}/download.record.list`,
name: "下载记录",
get: async function (params) {
return await http.post(this.url, params);
},
},
export:{
url: `${config.API_URL}/user.log.export`,
name: "用户日志导出",

View File

@ -0,0 +1,13 @@
<template>
<svg t="1754287674404" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5370" width="200" height="200"><path d="M800.64 66.56c44.25216 0 79.13984 34.34496 79.98464 78.36672l0.01536 1.63328V450.56c0 19.2-12.8 32-32 32-18.77504 0-31.42656-12.2368-31.97952-30.73024L816.64 450.56V152.96c0-12.42112-9.04192-21.83168-21.27872-22.3744l-1.12128-0.0256H202.24c-15.55456 0-25.0624 9.07264-25.57952 21.34016l-0.02048 1.05984V872.96c0 15.58016 9.10336 25.088 24.35072 25.57952l1.24928 0.02048h198.4c19.2 0 32 12.8 32 32 0 18.77504-12.2368 31.42656-30.73024 31.97952l-1.26976 0.02048H192.64c-44.25216 0-79.13984-34.34496-79.98464-78.36672l-0.01536-1.63328V146.56c0-44.25216 34.34496-79.13984 78.36672-79.98464l1.63328-0.01536h608z m-46.50496 539.39712l149.02272 148.992a32 32 0 0 1 0 45.28128L754.13504 949.248a32 32 0 0 1-45.25056-45.25056l94.40256-94.39744H464.53248a32 32 0 1 1 0-64h338.75456l-94.40256-94.40256a32 32 0 1 1 45.25056-45.24544zM467.84 418.56c16 0 28.8 12.8 28.8 28.8a28.672 28.672 0 0 1-27.66336 28.7744l-1.13664 0.0256h-166.4a28.68224 28.68224 0 0 1-28.8-28.8 28.672 28.672 0 0 1 27.66336-28.7744l1.13664-0.0256h166.4z m224-153.6c16 0 28.8 12.8 28.8 28.8a28.672 28.672 0 0 1-27.66336 28.7744l-1.13664 0.0256h-390.4a28.68224 28.68224 0 0 1-28.8-28.8 28.672 28.672 0 0 1 27.66336-28.7744l1.13664-0.0256h390.4z" p-id="5371"></path></svg>
</template>
<script>
export default {
name: "ExportLog"
}
</script>
<style scoped>
</style>

View File

@ -20,6 +20,7 @@ export { default as Account } from './Account.vue'
export { default as Notice } from './Notice.vue'
export { default as Password } from './Password.vue'
export { default as Secure } from './Secure.vue'
export { default as ExportLog } from './ExportLog.vue'
export { default as UserLog } from './Log.vue'
export { default as WechartRound } from './WechartRound.vue'
export { default as Cost } from './Cost.vue'

View File

@ -58,7 +58,10 @@ export default {
this.emitActivationDate();
},
emitActivationDate() {
let date = this.localDatePicker.map((date,index) => index===0? this.$TOOL.formatStartTime(date):this.$TOOL.formatEndTime(date));
let date = [];
if(this.localDatePicker && this.localDatePicker.length>0){
date = this.localDatePicker.map((date,index) => index===0? this.$TOOL.formatStartTime(date):this.$TOOL.formatEndTime(date));
}
this.$emit('update:activation_date', {
operator: this.activation_date.operator,
value: this.localDatePicker && this.localDatePicker.length > 0? date:[]

View File

@ -6,6 +6,7 @@
<div class="contentPopover" v-if="show">
<div class="bodyMain">
<span class="arrow"></span>
<template v-if="listIsType">
<div v-for="item in list" :key="item">
<div v-if="list.length>0 && type == item.type">
<div class="exportHeader">
@ -20,6 +21,15 @@
<el-progress class="exportPopover" :text-inside="true" :stroke-width="12" :percentage="item.rate" />
</div>
</div>
</template>
<div v-else>
<div>
<div class="exportHeader">
<div class="exportName">正在解析中...</div>
</div>
<el-progress class="exportPopover" :text-inside="true" :stroke-width="12" percentage="0" />
</div>
</div>
</div>
</div>
</div>
@ -36,6 +46,13 @@ export default {
},
watch:{
},
computed:{
listIsType(){
let arr = this.$TOOL.objCopy(this.list);
arr = arr.filter(item => item.type && item.type == this.type);
return arr.length && arr.length > 0;
}
},
data(){
return{
@ -121,6 +138,10 @@ export default {
this.$emit('updateShow', item);
if(res.data.status==1){
this.list = this.list.map(item =>
item.type === res.data.type ? {} : item
);
this.down(res.data);
}
}

View File

@ -42,10 +42,14 @@
<slot name="download"></slot>
</span>
</div>
<div class="importBox" v-if="progressShow">
<div class="name">导入进度</div>
<el-progress class="exportPopover" :text-inside="true" :stroke-width="12" :percentage="importInfo.rate" />
</div>
<div class="primaryText" v-if="analysisShow">
<div class="text success">正在解析...</div>
</div>
<div class="errText" v-if="errorShow">
<div class="deleteErr" @click="errorClick"><el-icon class="icon"><el-icon-Close/></el-icon></div>
<el-scrollbar ref="scrollbar" max-height="120px">
@ -74,7 +78,7 @@ export default {
size:{type:String, default:'small'},
title:{type:String, default: ""},
type:{type:[String, Number], default: ""},
httpDisabled:{type:Boolean, default:false}
httpDisabled:{type:Boolean, default:false},
},
data(){
return{
@ -88,6 +92,7 @@ export default {
fileShow:false,
params:{},
analysisShow:false,
importDis:false,
importTrue:false,
progressShow:false,
@ -106,19 +111,21 @@ export default {
},
mounted() {
eventBus.$on('sockBack', this.getWsResult);
// eventBus.$on('sockBack', this.getWsResult);
// eventBus.$on('sseBack', this.getWsResult);
eventBus.$on('sseBack', this.getWsResult);
},
unmounted() {
eventBus.$off('sockBack', this.getWsResult);
// eventBus.$off('sockBack', this.getWsResult);
// eventBus.$off('sseBack', this.getWsResult);
eventBus.$off('sseBack', this.getWsResult);
},
methods:{
getWsResult(res){
if(res.data && (res.data.type == 4 || res.data.type == 5 || res.data.type == 10 || res.data.type == 17 || res.data.type == 18 || res.data.type == 27 || res.data.type == 28 || res.data.type == 31 || res.data.type == 42 || res.data.type == 44 || res.data.type == 45 || res.data.type == 48 || res.data.type == 49 || res.data.type == 50 || res.data.type == 51)){
if(this.type == res.data.type){
this.analysisShow = false;
this.importInfo = res.data;
this.progressShow = true;
this.progressTrue = true;
@ -140,6 +147,10 @@ export default {
}
},
setAnalysisShow(params){
this.analysisShow = params;
},
//
importFile(){
this.visible = true;
@ -274,6 +285,20 @@ export default {
font-size: 10px;
}
}
.primaryText{
margin: 15px 0 0 0;
padding: 10px;
border-radius: 6px;
background: var(--el-color-primary-light-9);
::v-deep .text{
font-size: 12px;
line-height: 20px;
text-align: left;
}
.text{
color: var(--el-color-primary)
}
}
.errText{
margin: 15px 0 0 0;
padding: 10px;

View File

@ -47,8 +47,9 @@ export default {
},
methods:{
getDataList(val){
this.$emit('fetchData',val);
getDataList(visible){
if(!visible) return
this.$emit('fetchData',visible);
},
selectChange(e){
this.localData = e;

View File

@ -51,7 +51,7 @@ export default {
searchList:{
handler(val){
if(val && val.length>0){
this.columnList = val.filter(em=> !em.hide && em.is_search);
this.columnList = this.sortData(val.filter(em=> !em.hide && em.is_search));
this.params = this.groupByType(val);
}
},
@ -123,6 +123,26 @@ export default {
}
}
},
//
sortData(list){
const sortedArray = list.sort((a, b) => {
const priority = ['date_range', 'date'];
// absearch_type
const aPriority = priority.indexOf(a.search_type);
const bPriority = priority.indexOf(b.search_type);
// aba
if (aPriority !== -1 && bPriority === -1) return -1;
// bab
if (bPriority !== -1 && aPriority === -1) return 1;
//
if (aPriority !== -1 && bPriority !== -1) return aPriority - bPriority;
//
return 0;
});
return sortedArray;
},
groupByType(list){
const grouped = {};

View File

@ -6,5 +6,5 @@
export default {
//是否显示第三方授权登录
MY_SHOW_LOGIN_OAUTH: true
MY_SHOW_LOGIN_OAUTH: false
}

View File

@ -234,6 +234,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.finance.cost.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -299,6 +300,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.finance.cost.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -247,6 +247,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.finance.cost.summaryExport.post(this.reqParams);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -2,7 +2,7 @@
<el-container class="mainBox mainBoxHeaderNoBorder">
<el-header class="header">
<div class="left-panel">
<scImport ref="scImport" :size="size" type="51" :httpDisabled="httpDisabled" title="批量导入排除清单" @parentParams="importUpload" @importSuccess="importSuccess">
<scImport ref="scImport" :size="size" type="51" :httpDisabled="httpDisabled" title="批量导入指定预警清单" @parentParams="importUpload" @importSuccess="importSuccess">
<template #header>
<el-button v-auth="'warningExcludeImport'" type="primary" :size="size" plain @click="importFile" style="margin-right: 12px;">批量导入</el-button>
</template>
@ -212,7 +212,7 @@ export default {
const blob = new Blob([res]);
const text = new Date().getTime();
const eLink = document.createElement('a');
eLink.download = "排除清单导入模版_"+text+'.xlsx';
eLink.download = "指定预警清单导入模版_"+text+'.xlsx';
eLink.style.display = 'none';
eLink.href = URL.createObjectURL(blob);
document.body.appendChild(eLink);
@ -239,6 +239,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.early.exclude.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},

View File

@ -5,7 +5,7 @@
<list v-if="tabsTrue == 'list'"></list>
</el-tab-pane>
<el-tab-pane label="排除清单" name="exclude">
<el-tab-pane label="指定预警清单" name="exclude">
<exclude v-if="tabsTrue == 'exclude'"></exclude>
</el-tab-pane>
</el-tabs>

View File

@ -337,6 +337,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.early.earlyWarn.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -377,6 +378,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.early.earlyWarn.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -176,6 +176,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -175,6 +175,7 @@ export default {
async importUpload(params) {
const res = await this.$API.orders.order.maintenance.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -264,6 +265,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -220,6 +220,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.orders.order.sock.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -289,6 +290,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.orders.order.sock.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -176,6 +176,7 @@ export default {
async importUpload(params) {
const res = await this.$API.orders.order.maintenance.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -265,6 +266,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -302,7 +302,8 @@ export default {
async importUpload(params) {
this.httpDisabled = true;
const res = await this.$API.orders.order.maintenance.import.post(params);
if(res.code == 200){
if(res.code === 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -439,6 +440,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -303,6 +303,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.orders.order.repair.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},

View File

@ -175,6 +175,7 @@ export default {
async importUpload(params) {
const res = await this.$API.orders.order.maintenance.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -264,6 +265,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -175,6 +175,7 @@ export default {
async importUpload(params) {
const res = await this.$API.orders.order.maintenance.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -264,6 +265,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -111,6 +111,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.setup.material.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},

View File

@ -128,6 +128,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.setup.regional.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},

View File

@ -22,6 +22,11 @@
<el-table-column type="selection" align="center" width="40"></el-table-column>
<el-table-column width="200" label="备件类别" prop="spare_parts_category"></el-table-column>
<el-table-column width="200" label="故障率" prop="failure_rate"></el-table-column>
<el-table-column width="200" label="故障率计算时长" prop="duration">
<template #default="scope">
<span>{{scope.row.duration && scope.row.duration>0?scope.row.duration+'个月':scope.row.duration}}</span>
</template>
</el-table-column>
<el-table-column width="200" label="配置人" prop="creator_name"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="160">
<template #default="scope">
@ -106,6 +111,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.setup.spare.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},

View File

@ -208,6 +208,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.setup.bom.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -276,6 +277,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.setup.bom.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -282,6 +282,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.system.company.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -371,6 +372,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.system.company.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -189,13 +189,14 @@ export default {
//
exportChangeShow(params){
if(params.type == 8){
this.exportShow = params.status==0?true:false
this.exportShow = params.status==0?true:false;
}
},
async exportData() {
if(this.exportShow) return
const res = await this.$API.system.log.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -70,6 +70,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.system.log.commandExport.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -244,6 +244,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.system.spareInfo.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -316,6 +317,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.system.spareInfo.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -246,6 +246,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.system.spare.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -320,6 +321,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.system.spare.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -300,6 +300,7 @@
this.httpDisabled = true;
const res = await this.$API.system.user.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -438,6 +439,7 @@
if(this.exportShow) return
const res = await this.$API.system.user.export.post();
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -43,7 +43,7 @@
<el-input v-model="form.mobile" placeholder="请填写联系电话" clearable></el-input>
</el-form-item>
<el-form-item label="电子邮件" prop="email">
<el-input v-model="form.email" placeholder="请填写电子邮件" clearable></el-input>
<el-input v-model="form.email" :disabled="mode!=='add'" placeholder="请填写电子邮件" clearable></el-input>
</el-form-item>
</div>

View File

@ -176,6 +176,7 @@ export default {
async importUpload(params) {
const res = await this.$API.orders.order.maintenance.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -265,6 +266,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -182,6 +182,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.shipment.out.bomExport.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -238,6 +238,7 @@ export default {
this.httpDisabled = true;
const res = await this.$API.shipment.out.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -276,6 +277,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.shipment.out.stockExport.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -176,6 +176,7 @@ export default {
async importUpload(params) {
const res = await this.$API.orders.order.maintenance.import.post(params);
if(res.code == 200){
this.$refs.scImport.setAnalysisShow(true);
this.$message.success('上传成功,开始导入数据');
}
},
@ -265,6 +266,7 @@ export default {
if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},

View File

@ -52,6 +52,7 @@
logs: defineAsyncComponent(() => import('./user/logs')),
upToEnterprise: defineAsyncComponent(() => import('./user/upToEnterprise')),
bind: defineAsyncComponent(() => import('./user/bind')),
ExportLog: defineAsyncComponent(() => import('./user/exportLog')),
},
data() {
return {
@ -84,6 +85,11 @@
{
groupName: "数据管理",
list: [
{
icon: "sc-icon-ExportLog",
title: "导出记录",
component: "exportLog"
},
{
icon: "sc-icon-UserLog",
title: "操作日志",

View File

@ -21,7 +21,7 @@
</div>
</el-form-item>
<el-form-item label="邮箱地址" prop="email">
<el-input v-model="form.email"></el-input>
<el-input v-model="form.email" disabled></el-input>
</el-form-item>
<el-form-item label="个性签名" prop="about">
<el-input v-model="form.about" type="textarea"></el-input>

View File

@ -0,0 +1,190 @@
<template>
<el-card class="logCard" shadow="never" header="导出记录">
<el-main class="nopadding">
<div class="searchMain logSearchMain">
<scTableSearch ref="scSearch" :searchList="list.column" :paramsData="params" :searchShow="searchShow" @fetchSelectData="getSelectData" @changeHeaderData="getHeaderData"></scTableSearch>
<div class="searchItem searchBtn" v-if="searchHeaderShow">
<el-button :size="size" :icon="searchShow?'el-icon-ArrowUpBold':'el-icon-ArrowDownBold'" @click="searchShowClick">{{searchShow?'收起':'更多'}}</el-button>
<el-button :size="size" type="primary" icon="el-icon-search" @click="upSearch">查询</el-button>
<el-button :size="size" type="info" icon="el-icon-RefreshRight" @click="reset">重置</el-button>
</div>
<div class="exportBtn">
</div>
</div>
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" row-key="id" stripe border :size="size" @row-click="rowClick" @columnBack="columnBack">
<template #file_url="scope">
<span class="tableColor primary" @click="linkExcel(scope.row)"><el-icon><sc-icon-Excel/></el-icon> </span>
</template>
</scTable>
</el-main>
</el-card>
</template>
<script>
import {eventBus} from "@/utils/eventBus";
export default {
name: 'exportLog',
components:{
},
data() {
return {
size:"small",
setMap:{
},
list:{
apiObj: this.$API.user.record,
column: [],
},
exportShow:false,
searchShow:false,
searchHeaderShow:false,
filterMap:{
data:{}
},
params: {},
}
},
provide(){
return{
filterUploadClick:this.filterClick,
filterUploadParams:this.filterParams,
filterTagClose:this.tagClose,
filterModelParams:this.filterModelParams,
}
},
watch:{
'list.column':{
handler(val){
this.searchHeaderShow = val.length>0 && val.some(em=>em.is_search);
},
immediate:false,
deep:true
}
},
computed:{
filterModelParams(){
return this.filterMap
},
},
mounted() {
},
methods:{
/**
* 表格检索开始
* */
columnBack(val){
val.forEach(item=>{
if(item.prop === "type"){
item.data = this.setMap.typeList;
}
})
this.list.column = val;
},
async filterClick(item) {
let {data, params} = item;
let filterParams = Object.assign(this.params,params);
this.filterMap.data = filterParams;
let searchParams = this.$TOOL.objCopy(this.params);
searchParams.creator_id = {
operator:"in",
value:[this.$TOOL.data.get('USER_INFO').id]
};
searchParams.field = ""
if (typeof data.prop === 'string') {
searchParams.field = data.prop;
} else {
searchParams.field = data.prop[0];
}
if (data.search_type == 'select' || data.search_type == 'checkbox') {
await this.getField(data,searchParams);
}
},
filterParams(params){
let filterParams = Object.assign(this.params,params);
this.filterMap.data = filterParams;
this.upSearch();
},
tagClose(params){
let filterParams = Object.assign(this.params,params);
this.filterMap.data = filterParams;
},
searchShowClick(){
this.searchShow = !this.searchShow;
eventBus.$emit('close-all-popovers');
},
getHeaderData(params){
this.params = params;
this.filterMap.data = params;
},
async getSelectData(item) {
let {data, params} = item;
this.params = params;
this.filterMap.data = params;
let searchParams = this.$TOOL.objCopy(params);
searchParams.creator_id = {
operator:"in",
value:[this.$TOOL.data.get('USER_INFO').id]
};
searchParams.field = ""
if (typeof data.prop === 'string') {
searchParams.field = data.prop;
} else {
searchParams.field = data.prop[0];
}
if (data.search_type == 'select' || data.search_type == 'checkbox') {
await this.getField(data,searchParams)
}
},
async getField(data,searchParams) {
const res = await this.$API.system.log.operation.post(searchParams);
if (res.code == 200) {
if (res.data && res.data.length > 0) {
res.data.forEach(item => {
if (data.prop === 'type') {
item.label = item[data.prop+'_text'];
item.value = item[data.prop];
} else {
item.label = item[data.prop];
item.value = item[data.prop];
}
})
}
this.list.column.forEach(item => {
if (item.prop == data.prop) {
item.data = res.data;
}
})
}
},
/** 表格检索结束 */
linkExcel(row){
window.open(row.file_url,'_blank');
},
upSearch(){
this.$refs.table.upData(this.params);
},
reset(){
this.params = {};
this.filterMap.data = {};
this.$refs.scSearch.reload();
eventBus.$emit('reset-popovers');
this.$refs.table.reload();
},
rowClick(){
}
}
}
</script>
<style lang="scss" scoped>
.logCard :deep(.el-card__body){padding: 0 !important;}
.tableColor.primary{color: var(--el-color-primary);cursor: pointer;display: flex;align-items: center;}
.tableColor .el-icon{margin-right: 8px;}
</style>

View File

@ -200,6 +200,7 @@
if(this.exportShow) return
const res = await this.$API.user.export.post(this.params);
if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出');
}
},