From f40836bbcd74b931b332a1c262e6776af1e4cc14 Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期日, 23 六月 2024 21:10:05 +0800 Subject: [PATCH] update --- src/views/dnc/craft/document/Children.vue | 103 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 60 insertions(+), 43 deletions(-) diff --git a/src/views/dnc/craft/document/Children.vue b/src/views/dnc/craft/document/Children.vue index 3ccc873..643e1f4 100644 --- a/src/views/dnc/craft/document/Children.vue +++ b/src/views/dnc/craft/document/Children.vue @@ -1,64 +1,75 @@ <!-- * @Date: 2024-05-26 21:50:26 * @LastEditors: Sneed - * @LastEditTime: 2024-06-11 22:19:59 + * @LastEditTime: 2024-06-12 23:57:38 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/craft/document/Children.vue --> <template> - <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="handleClick"> - <el-tab-pane label="绋嬪簭" name="1"> - <el-button type="primary" @click="addFile">娣诲姞鏂囦欢</el-button> - <el-table :data="tableData" style="width: 100%"> - <el-table-column label="鏂囦欢鍚�" prop="filename" width=""></el-table-column> - <el-table-column label="鏂囦欢澶у皬" prop="contentLength" width=""></el-table-column> - <el-table-column label="鏂囦欢绫诲瀷" prop="suffix" width=""></el-table-column> + <div> + <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="handleClick"> + <el-tab-pane label="绋嬪簭" name="1"> + <el-button type="primary" @click="addFile(1)">娣诲姞鏂囦欢</el-button> + <el-table :data="tableData" style="width: 100%"> + <el-table-column label="鏂囦欢鍚�" prop="filename" width=""></el-table-column> + <el-table-column label="鏂囦欢澶у皬" prop="contentLength" width=""></el-table-column> + <el-table-column label="鏂囦欢绫诲瀷" prop="suffix" width=""></el-table-column> - <el-table-column label="鎿嶄綔" prop="" width=""> - <template #default="scope"> - <el-button-group> - <el-popconfirm v-if="!scope.row.isSet" title="纭畾鍒犻櫎鍚楋紵" - @confirm="table_del(scope.row, scope.$index)"> - <template #reference> - <el-button text type="primary" size="small">鍒犻櫎</el-button> - </template> - </el-popconfirm> - </el-button-group> - </template> - </el-table-column> - </el-table> - </el-tab-pane> - <el-tab-pane label="鏂囨。" name="2"> - <el-button type="primary" @click="addFile">娣诲姞鏂囦欢</el-button> - <el-table :data="tableData1" style="width: 100%"> - <el-table-column label="鏂囦欢鍚�" prop="filename" width=""></el-table-column> - <el-table-column label="鏂囦欢澶у皬" prop="contentLength" width=""></el-table-column> - <el-table-column label="鏂囦欢绫诲瀷" prop="suffix" width=""></el-table-column> + <el-table-column label="鎿嶄綔" prop="" width=""> + <template #default="scope"> + <el-button-group> + <el-popconfirm v-if="!scope.row.isSet" title="纭畾鍒犻櫎鍚楋紵" + @confirm="table_del(scope.row, scope.$index)"> + <template #reference> + <el-button text type="primary" size="small">鍒犻櫎</el-button> + </template> + </el-popconfirm> + </el-button-group> + </template> + </el-table-column> + </el-table> + </el-tab-pane> + <el-tab-pane label="鏂囨。" name="2"> + <el-button type="primary" @click="addFile(2)">娣诲姞鏂囦欢</el-button> + <el-table :data="tableData1" style="width: 100%"> + <el-table-column label="鏂囦欢鍚�" prop="filename" width=""></el-table-column> + <el-table-column label="鏂囦欢澶у皬" prop="contentLength" width=""></el-table-column> + <el-table-column label="鏂囦欢绫诲瀷" prop="suffix" width=""></el-table-column> - <el-table-column label="鎿嶄綔" prop="" width=""> - <template #default="scope"> - <el-button-group> - <el-popconfirm v-if="!scope.row.isSet" title="纭畾鍒犻櫎鍚楋紵" - @confirm="table_del(scope.row, scope.$index)"> - <template #reference> - <el-button text type="primary" size="small">鍒犻櫎</el-button> - </template> - </el-popconfirm> - </el-button-group> - </template> - </el-table-column> - </el-table> - </el-tab-pane> - </el-tabs> + <el-table-column label="鎿嶄綔" prop="" width=""> + <template #default="scope"> + <el-button-group> + <el-popconfirm v-if="!scope.row.isSet" title="纭畾鍒犻櫎鍚楋紵" + @confirm="table_del(scope.row, scope.$index)"> + <template #reference> + <el-button text type="primary" size="small">鍒犻櫎</el-button> + </template> + </el-popconfirm> + </el-button-group> + </template> + </el-table-column> + </el-table> + </el-tab-pane> + </el-tabs> + <File ref="file" @success="success"></File> + </div> + </template> <script> +import File from './File.vue' export default { + components: { + File + }, props: { list: { type: Array, default() { return [] } + }, + id: { + type: String, } }, computed: { @@ -75,6 +86,9 @@ } }, methods: { + addFile(fileType) { + this.$refs.file.open(fileType, this.id) + }, handleClick() { }, @@ -84,6 +98,9 @@ this.$emit('delete') } }) + }, + success() { + this.$emit('success') } } } -- Gitblit v1.9.3