<!--
|
* @Date: 2024-05-22 23:18:15
|
* @LastEditors: Sneed
|
* @LastEditTime: 2024-06-05 23:03:45
|
* @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/station-file/Log.vue
|
-->
|
<template>
|
<el-container>
|
<el-header>
|
<el-input v-model="params.fileName" style="width: 240px;margin-left: 8px;" placeholder="">
|
<template #prefix>文件名称</template>
|
</el-input>
|
<el-select v-model="params.fileType" style="width: 240px;margin-left: 8px;">
|
<template #prefix>
|
文件类型
|
</template>
|
<el-option v-for="item in options.fileType" :key="item.value" :label="item.label" :value="item.value" />
|
</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-date-picker>
|
<el-select v-model="params.operationType" style="width: 240px;margin-left: 8px;margin-right: auto;">
|
<template #prefix>
|
操作类型
|
</template>
|
<el-option v-for="item in options.operationType" :key="item.value" :label="item.label"
|
:value="item.value" />
|
</el-select>
|
</el-header>
|
<el-main>
|
<scTable v-if="id" highlight-current-row @dataChange="dataChange" @row-click="rowClick" ref="table"
|
:params="params" :apiObj="apiObj" @selection-change="selectionChange" stripe>
|
<el-table-column label="文件名称" prop="fileName">
|
</el-table-column>
|
<el-table-column label="版本" prop="version"></el-table-column>
|
<el-table-column label="操作人员" prop="operatorName"></el-table-column>
|
<el-table-column label="操作类型" prop="operationTypeDesc"></el-table-column>
|
<el-table-column label="操作结果" prop="operationResponse"></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="operationTime"></el-table-column>
|
</scTable>
|
</el-main>
|
</el-container>
|
</template>
|
|
<script>
|
export default {
|
props: {
|
id: {
|
type: String
|
}
|
},
|
watch: {
|
id(val) {
|
this.$nextTick(() => {
|
val && this.$refs?.table?.reload()
|
})
|
},
|
params: {
|
handler() {
|
this.$refs.table.reload()
|
},
|
deep: true
|
}
|
},
|
data() {
|
return {
|
params: {
|
fileName: '',
|
fileType: '',
|
time: [],
|
operationType: ''
|
},
|
options: {
|
fileType: []
|
},
|
apiObj: {
|
get: async (data) => {
|
let params = {
|
current: data.current,
|
size: data.size
|
}
|
let dataNew = {
|
...this.params,
|
operationStartTime: this.params[0] || "",
|
operationEndTime: this.params[1] || ""
|
}
|
return await this.$HTTP.post(`/api/blade-dnc/operation-file/page/${this.id}`, {}, { params, data: dataNew }).then(res => {
|
return res
|
})
|
}
|
}
|
}
|
},
|
created() {
|
this.init()
|
},
|
methods: {
|
init() {
|
this.$HTTP.get(`/api/blade-dnc/operation-file/list/suffix`).then(res => {
|
this.options.fileType = res.data.suffix.map(v => {
|
return {
|
value: v,
|
label: v
|
}
|
})
|
})
|
},
|
dataChange(data) {
|
console.log(data)
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped></style>
|