<!--
|
* @Date: 2024-05-20 21:43:10
|
* @LastEditors: Sneed
|
* @LastEditTime: 2024-06-02 21:43:55
|
* @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/log/index.vue
|
-->
|
<template>
|
<el-main style="height: 100%;">
|
<el-card shadow="never" style="height: 100%;" body-style="height: 100%">
|
<el-container>
|
<el-header>
|
<el-button @click="exportExcel">导出</el-button>
|
<el-select style="margin-left: auto;padding-left: 20px;width: 240px;" v-model="params.sourceType"
|
placeholder="请选择">
|
<template #prefix><span style="margin-right: 6px;">文件来源</span></template>
|
<el-option v-for="item in options.sourceType" :key="item.id" :label="item.name"
|
:value="item.id" />
|
</el-select>
|
<el-select style="margin-left: 8px;padding-left: 20px;width: 240px;" v-model="params.operationType"
|
placeholder="请选择">
|
<template #prefix><span style="margin-right: 6px;">操作类型</span></template>
|
<el-option v-for="item in options.operationType" :key="item.id" :label="item.name"
|
:value="item.id" />
|
</el-select>
|
<el-date-picker style="width: 260px;flex-grow: 0;margin-left: 8px;" v-model="params.time"
|
type="daterange" range-separator="-" start-placeholder="操作开始时间" end-placeholder="操作结束时间" />
|
<el-input v-model="params.keyWord" style="width: 240px;margin-left: 8px;" placeholder="" clearable>
|
<template #prefix>关键词</template>
|
</el-input>
|
<el-button style="margin-left: 8px;" @click="search" type="primary"
|
icon="el-icon-search"></el-button>
|
</el-header>
|
<el-main>
|
<scTable highlight-current-row @dataChange="dataChange" @row-click="rowClick" ref="table"
|
:params="params" :apiObj="apiObj" @selection-change="selectionChange" stripe>
|
<el-table-column type="selection" width="50"></el-table-column>
|
<el-table-column label="文件名称" prop="fileName">
|
</el-table-column>
|
<el-table-column label="版本" prop="version"></el-table-column>
|
<el-table-column label="文件类型" prop="suffix"></el-table-column>
|
<el-table-column label="文件来源" prop="sourceTypeDesc"></el-table-column>
|
<el-table-column label="操作类型" prop="operationTypeDesc"></el-table-column>
|
<el-table-column label="源路径" prop="sourcePathName"></el-table-column>
|
<el-table-column label="目标路径" prop="targetPathName"></el-table-column>
|
<el-table-column label="文件位置" prop="fileLocationDesc"></el-table-column>
|
<el-table-column label="操作人员" prop="operatorName"></el-table-column>
|
<el-table-column label="操作时间" prop="operationTime"></el-table-column>
|
</scTable>
|
</el-main>
|
</el-container>
|
</el-card>
|
</el-main>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
selection: [],
|
params: {},
|
options: {
|
sourceType: [
|
{
|
name: '本地文件',
|
id: 0
|
},
|
{
|
name: '我的文档',
|
id: 1
|
},
|
{
|
name: '工位文件',
|
id: 2
|
},
|
{
|
name: '工厂文件',
|
id: 3
|
},
|
{
|
name: '机床回传',
|
id: 4
|
},
|
{
|
name: '工艺包',
|
id: 5
|
},
|
],
|
operationType: [
|
{
|
name: '上传',
|
id: 1
|
},
|
{
|
name: '下载',
|
id: 2
|
},
|
{
|
name: '删除',
|
id: 3
|
},
|
{
|
name: '更新',
|
id: 4
|
},
|
{
|
name: '移动',
|
id: 5
|
},
|
{
|
name: '复制',
|
id: 6
|
},
|
],
|
},
|
apiObj: {
|
get: async (data) => {
|
let params = {
|
current: data.current,
|
size: data.size,
|
}
|
let newData = {
|
...data,
|
...this.params,
|
startTime: this.params?.time?.[0] || '',
|
endTime: this.params?.time?.[1] || '',
|
}
|
return await this.$HTTP.post(`/api/blade-dnc/operation-file/page-allData?current=1&size=15`, {}, { params, data: newData }).then(res => {
|
return res
|
})
|
}
|
},
|
}
|
},
|
methods: {
|
exportExcel() {
|
let data = {
|
...this.params,
|
startTime: this.params?.time?.[0] || '',
|
endTime: this.params?.time?.[1] || '',
|
}
|
this.$HTTP.post(`/api/blade-dnc/operation-file/export-log`, data).then(res => {
|
|
})
|
},
|
search() {
|
this.$refs.table.reload()
|
},
|
selectionChange(selection) {
|
this.selection = selection
|
},
|
del(selection) {
|
|
},
|
table_edit() {
|
|
},
|
rowClick() {
|
|
},
|
dataChange() {
|
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped></style>
|