| | |
| | | <!-- |
| | | * @Date: 2024-05-26 21:50:26 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-06-11 22:19:59 |
| | | * @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="" width=""></el-table-column> |
| | | <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-column label="操作" prop="" width=""></el-table-column> |
| | | <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-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-column label="文件归属" prop="" width=""></el-table-column> |
| | | <el-table-column label="操作" prop="" width=""></el-table-column> |
| | | <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-tabs> |
| | |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | list: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | tableData() { |
| | | return this.list.filter(v => v.fileType === 1) |
| | | }, |
| | | tableData1() { |
| | | return this.list.filter(v => v.fileType === 2) |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | activeName: '1', |
| | |
| | | methods: { |
| | | handleClick() { |
| | | |
| | | }, |
| | | table_del(row) { |
| | | this.$HTTP.delete(`/api/blade-dnc/dnc-art-file/remove`, {}, { data: [row.id] }).then(res => { |
| | | if (res.success) { |
| | | this.$emit('delete') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <!-- |
| | | * @Date: 2024-05-26 16:12:09 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-06-11 20:07:17 |
| | | * @LastEditTime: 2024-06-11 22:18:42 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/craft/document/index.vue |
| | | --> |
| | | <!-- |
| | |
| | | <template #prefix> |
| | | 查询目标 |
| | | </template> |
| | | <el-option v-for="item in options.fileType" :key="item.value" :label="item.label" |
| | | <el-option v-for="item in options.type" :key="item.value" :label="item.label" |
| | | :value="item.value" /> |
| | | </el-select> |
| | | <el-input style="width: 240px;margin-left: 8px;" v-model="params.keyword" |
| | |
| | | </scTable> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <h2>工艺包详情</h2> |
| | | <el-row> |
| | | <h2 style="background-color: var(--el-color-primary);color: #fff;padding: 4px 20px;"> |
| | | 工艺包详情</h2> |
| | | <el-row style="margin: 14px 0;"> |
| | | <el-col :span="12"> |
| | | 工艺包名称: |
| | | 工艺包名称:{{ info.name }} |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | 工艺包编号: |
| | | 工艺包编号:{{ info.code }} |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | 工艺包所在目录: |
| | | 工艺包所在目录:{{ info.sourcePath }} |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <Children></Children> |
| | | <el-col :span="24" style="margin: 14px 0;"> |
| | | <Children :list="list" @delete="deleteItem"></Children> |
| | | </el-col> |
| | | </el-row> |
| | | </el-col> |
| | |
| | | <template #prefix> |
| | | 文件类型 |
| | | </template> |
| | | <el-option v-for="item in options.fileType" :key="item.value" :label="item.label" |
| | | <el-option v-for="item in options.fileClass" :key="item.value" :label="item.label" |
| | | :value="item.value" /> |
| | | </el-select> |
| | | <el-select v-model="searchParams.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-header> |
| | | <el-main> |
| | | |
| | | <scTable highlight-current-row ref="table1" :apiObj="apiObj1" @selection-change="selectionChange" |
| | | stripe> |
| | | <el-table-column label="文件名称" prop="fileName" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="版本号" prop="version" width="160"></el-table-column> |
| | | <el-table-column label="文件类型" prop="suffix" width="160"></el-table-column> |
| | | <el-table-column label="文件属性" prop="fileType" width="160"></el-table-column> |
| | | <el-table-column label="操作类型" prop="operationType" width="160"></el-table-column> |
| | | <el-table-column label="操作人员" prop="operatorName" width="160"></el-table-column> |
| | | <el-table-column label="操作时间" prop="operationTime" width="160"></el-table-column> |
| | | </scTable> |
| | | </el-main> |
| | | </el-container> |
| | | </scDialog> |
| | |
| | | components: { |
| | | Children |
| | | }, |
| | | watch: { |
| | | searchParams: { |
| | | handler() { |
| | | this.$refs?.table1?.reload() |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | treeData: [], |
| | | selection: [], |
| | | params: {}, |
| | | params: { |
| | | type: 'BAG_OR_PROCESS' |
| | | }, |
| | | selectNode: { |
| | | // id: 0 |
| | | }, |
| | |
| | | let params = { |
| | | ...data, |
| | | catalogueId: this.selectNode.id, |
| | | ...this.params |
| | | // ...this.params |
| | | } |
| | | return await this.$HTTP.get(`/api/blade-dnc/dnc-art-bag/cur-sub-page`, {}, { params }).then(res => { |
| | | return res |
| | | }) |
| | | } |
| | | }, |
| | | apiObj1: { |
| | | get: async (data) => { |
| | | let params = { |
| | | ...data, |
| | | catalogueId: this.selectNode.id, |
| | | // ...this.params |
| | | } |
| | | return await this.$HTTP.post(`/api/blade-dnc/dnc-art-bag-log/page`, {}, { params, data: { ...this.searchParams } }).then(res => { |
| | | return res |
| | | }) |
| | | } |
| | |
| | | logVisible: false, |
| | | row: {}, |
| | | options: { |
| | | |
| | | type: [ |
| | | { |
| | | value: 'BAG_OR_PROCESS', |
| | | label: '工艺包和程序文档' |
| | | }, |
| | | { |
| | | value: 'ONLY_BAG', |
| | | label: '仅工艺包' |
| | | }, |
| | | { |
| | | value: 'ONLY_PROCESS', |
| | | label: '仅程序文档' |
| | | }, |
| | | ], |
| | | fileType: [ |
| | | { |
| | | value: 1, |
| | | label: '程序' |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: '文档' |
| | | }, |
| | | ] |
| | | }, |
| | | searchParams: { |
| | | fileName: '', |
| | | fileClass: '', |
| | | fileType: '', |
| | | }, |
| | | info: {}, |
| | | list: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.$HTTP.get(`/api/blade-system/param/detail?paramKey=dnc.support.file.suffix.list`).then(res => { |
| | | this.options.fileClass = res.data.paramValue.split(',').map(v => { |
| | | return { |
| | | value: v, |
| | | label: v |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | loadNode(node, resolve) { |
| | | console.log(node, '>>>>>>') |
| | | let id = node.level === 0 ? '' : node.data.id |
| | |
| | | this.logVisible = true |
| | | this.row = row |
| | | }, |
| | | dataChange(data) { |
| | | console.log(data) |
| | | this.rowClick(data.data.records[0]) |
| | | }, |
| | | rowClick(row) { |
| | | if (!row) return this.info = {} |
| | | this.$HTTP.get(`/api/blade-dnc/dnc-art-bag/get/${row.id}`).then(res => { |
| | | if (res.success) { |
| | | this.info = res.data |
| | | } else { |
| | | this.info = {} |
| | | } |
| | | }) |
| | | this.$HTTP.get(`/api/blade-dnc/dnc-art-file/list?artBagId=${row.id}`).then(res => { |
| | | if (res.success) { |
| | | this.list = res.data |
| | | } |
| | | }) |
| | | }, |
| | | deleteItem() { |
| | | this.$HTTP.get(`/api/blade-dnc/dnc-art-file/list?artBagId=${this.info.id}`).then(res => { |
| | | if (res.success) { |
| | | this.list = res.data |
| | | } |
| | | }) |
| | | }, |
| | | exportExcel() { |
| | | |
| | | }, |