gaoshp
2024-05-26 82a5da6bbeeadf1c5f448158dae7d1838efc9d2e
工位文件
已修改4个文件
145 ■■■■ 文件已修改
src/views/dnc/station-file/File.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/station-file/Log.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/station-file/index.vue 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/MYTree.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/station-file/File.vue
@@ -1,13 +1,29 @@
<!--
 * @Date: 2024-05-22 23:37:07
 * @LastEditors: Sneed
 * @LastEditTime: 2024-05-22 23:37:12
 * @LastEditTime: 2024-05-26 15:42:35
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/station-file/File.vue
-->
<template>
    <div>
        工位文件
    </div>
    <el-container>
        <el-header>
            <el-button type="primary">归档</el-button>
        </el-header>
        <el-main>
            <h2>程序</h2>
            <el-table :data="tableData" style="width: 100%">
                <el-table-column label="文件名称" prop="" width=""></el-table-column>
                <el-table-column label="版本" prop="" width=""></el-table-column>
                <el-table-column label="大小" prop="" width=""></el-table-column>
            </el-table>
            <h2>文件</h2>
            <el-table :data="tableData" style="width: 100%">
                <el-table-column label="文件名称" prop="" width=""></el-table-column>
                <el-table-column label="版本" prop="" width=""></el-table-column>
                <el-table-column label="大小" prop="" width=""></el-table-column>
            </el-table>
        </el-main>
    </el-container>
</template>
<script>
src/views/dnc/station-file/Log.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-05-22 23:18:15
 * @LastEditors: Sneed
 * @LastEditTime: 2024-05-22 23:35:38
 * @LastEditTime: 2024-05-26 16:04:41
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/station-file/Log.vue
-->
<template>
@@ -26,25 +26,18 @@
                <el-option v-for="item in options.typeId" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
        </el-header>
        <el-main>
            <scTable highlight-current-row @dataChange="dataChange" @row-click="rowClick" ref="table" :params="params"
        <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 type="selection" width="50"></el-table-column>
                <el-table-column label="文件名称" prop="name">
                <el-table-column label="文件名称" prop="fileName">
                </el-table-column>
                <el-table-column label="文件路径" prop="allPathName"></el-table-column>
                <el-table-column label="大小" prop="contentLength"></el-table-column>
                <el-table-column label="文件类型" prop="suffix"></el-table-column>
                <el-table-column label="更新时间" prop="updateTime"></el-table-column>
                <el-table-column label="操作" fixed="right" align="right" width="160">
                    <template #default="scope">
                        <el-button-group>
                            <el-button text type="primary" size="small"
                                @click="table_edit(scope.row, scope.$index)">编辑</el-button>
                            <el-button text type="primary" size="small" @click="del([scope.row])">删除</el-button>
                        </el-button-group>
                    </template>
                </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>
@@ -52,6 +45,18 @@
<script>
export default {
    props: {
        id: {
            type: String
        }
    },
    watch: {
        id(val) {
            this.$nextTick(() => {
                val && this.$refs?.table?.reload()
            })
        }
    },
    data() {
        return {
            params: {
@@ -59,9 +64,25 @@
            },
            options: {
                typeId: []
            },
            apiObj: {
                get: async (data) => {
                    let params = {
                        current: data.current,
                        size: data.size
                    }
                    return await this.$HTTP.post(`/api/blade-dnc/operation-file/page/${this.id}`, {}, { params,data:this.params }).then(res => {
                        return res
                    })
                }
            }
        }
    },
    methods: {
        dataChange (data) {
            console.log(data)
        }
    }
}
</script>
src/views/dnc/station-file/index.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-05-20 21:43:10
 * @LastEditors: Sneed
 * @LastEditTime: 2024-05-22 23:37:00
 * @LastEditTime: 2024-05-26 16:02:09
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/station-file/index.vue
-->
<template>
@@ -11,16 +11,7 @@
                <el-aside width="200px">
                    <el-container>
                        <el-main>
                            <el-tree default-expand-all ref="tree" node-key="id" :data="treeData" :props="{
                                label: 'name',
                            }" @node-click="nodeClick" highlight-current :current-node-key="selectNode.id">
                                <template #default="{ node, data }">
                                    <span :class="data.isGroup ? 'active' : ''" class="custom-tree-node">
                                        <span>{{
                                            node.label || data.code }}</span>
                                    </span>
                                </template>
                            </el-tree>
                            <MYTree :props="props" v-model="treeChecked" @loaded="query"></MYTree>
                        </el-main>
                        <!-- <el-footer>
                            <el-button type="primary" round @click="addFolder">新增文件夹</el-button>
@@ -33,7 +24,7 @@
                            <File></File>
                        </el-tab-pane>
                        <el-tab-pane label="操作日志" name="2">
                            <Log />
                            <Log :id="id"/>
                        </el-tab-pane>
                    </el-tabs>
                </el-main>
@@ -45,10 +36,35 @@
<script>
import Log from './Log.vue'
import File from './File.vue'
import MYTree from '@/views/mdc/MYTree.vue'
export default {
    components: {
        Log,
        File
        File,
        MYTree
    },
    data() {
        return {
            id: '',
            activeName: '2',
            treeChecked: {},
            props: {
                disabled: function (data,node) {
                    return !data.ftpCatalogue
                }
            }
        }
    },
    watch: {
        treeChecked(val) {
            console.log(val,'>>>>>>')
            this.id = val?.[0]
        }
    },
    methods: {
        query () {
        }
    }
}
</script>
src/views/mdc/MYTree.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-18 19:53:35
 * @LastEditors: Sneed
 * @LastEditTime: 2024-04-23 23:09:18
 * @LastEditTime: 2024-05-26 15:49:11
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/MYTree.vue
-->
<template>
@@ -21,6 +21,12 @@
        getAll: {
            type: Boolean,
            default: false
        },
        props: {
            type: Object,
            default: () => {
                return {}
            }
        }
    },
    data() {
@@ -34,7 +40,8 @@
                disabled: 'disabled',
                class: (data, node) => {
                    return this.value.includes(data.id) ? 'active' : ''
                }
                },
                ...this.props
            },
            data: [],
            value: [],
@@ -54,10 +61,13 @@
        this.getList()
    },
    methods: {
        renderContent(h, { data }) {
        renderContent(h, { data,node }) {
            let img = data.groupTag == 'fms_beltline'
            return h('a', {
                disabled: data.disabled
                class: {
                    disabled: this.props.disabled ? this.props.disabled(data,node) : data.disabled
                },
                disabled: this.props.disabled ? this.props.disabled(data,node) : data.disabled
            },
                img ? h('img', {
                    src: pmsPng
@@ -74,6 +84,7 @@
                    this.$nextTick(() => {
                        this.currentNodeKey = this.firstWorkKey
                        this.$emit('loaded', this.firstWorkKey)
                        this.$emit('request', data)
                    })
                }
            })
@@ -131,4 +142,7 @@
.active .el-tree-node__content {
    background: var(--el-color-primary) !important;
}
a.disabled {
    color: #ccc;
}
</style>