| | |
| | | >{{$t('common.details')}}</el-link |
| | | > |
| | | <el-link class="elLink" |
| | | @click="dialogFormVisible = true" |
| | | @click="getAttachTable" |
| | | style="margin-left: 20px; " |
| | | >{{$t('common.enclosure')}}</el-link |
| | | > |
| | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-row > |
| | | <el-col :span="3"> <el-link class="elLink" :underline="false" >{{$t('common.append')}}</i></el-link></el-col> |
| | | <el-col :span="3"> <el-link class="elLink" :underline="false" >{{$t('common.delete')}}</i></el-link></el-col> |
| | | <el-col :span="3"> <el-link class="elLink" :underline="false" >{{$t('common.reset')}}</i></el-link></el-col> |
| | | <el-col :span="3"> <el-link class="elLink" :underline="false" @click="setAttachInsert" >{{$t('common.append')}}</i></el-link></el-col> |
| | | <el-col :span="3"> <el-link class="elLink" :underline="false" @click="setAttachDel" >{{$t('common.delete')}}</i></el-link></el-col> |
| | | <!-- <el-col :span="3"> <el-link class="elLink" :underline="false" >{{$t('common.reset')}}</i></el-link></el-col> --> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-table |
| | | :data="tableAttach" |
| | | ref="filterTable" |
| | | height="99%" |
| | | border |
| | | style="width: 100%" |
| | | @selection-change="handleAttatchChange" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column width="60" type="index" :label="$t('common.index')" /> |
| | | <el-table-column prop="date" |
| | | :label="$t('common.fileNme')" |
| | |
| | | dataQuery_selectDomains, |
| | | dataQuery_selectFields, |
| | | dataQuery_selectByPage, |
| | | dataQuery_uploadFiles, |
| | | dataQuery_selectFiles, |
| | | dataQuery_deletes, |
| | | } from '../../api/api'; |
| | | |
| | | import { getToken } from "../../utils/auth.js"; |
| | | import catalogueTree from '../../components/catalogueTree.vue'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | export default { |
| | |
| | | components: { MyBread, catalogueTree }, |
| | | data() { |
| | | return { |
| | | attachtable: ['b_pac_geologic_hazard', 'b_hydrogeology', 'b_pac_meteorological', 'b_pac_marine_meteorological', 'b_pac_frozensoil', 's_borehole', 'm_marker', 'm_hydraulic_protection', 'm_equipment_nameplate'], |
| | | formInline: { |
| | | file: '', |
| | | }, |
| | | tree: [ |
| | | { |
| | | tabDesc: '基础数据', |
| | | tab: '基础数据', |
| | | value: 'BD', |
| | | children: [], |
| | | }, |
| | | { |
| | | tabDesc: '业务数据', |
| | | tab: '业务数据', |
| | | value: 'BS', |
| | | children: [], |
| | | }, |
| | | ], |
| | | tableAttach: [], |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'tabDesc', |
| | | label: 'tab', |
| | | }, |
| | | btnStatus: { |
| | | select: false, |
| | |
| | | filter: null, |
| | | wkt: null, |
| | | }, |
| | | getClickTable: null, |
| | | attacgSelection: [], |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.getTreeDataAll(); |
| | | }, |
| | | methods: { |
| | | async setAttachDel() { |
| | | var std = []; |
| | | for (var i in this.attacgSelection) { |
| | | std.push(this.attacgSelection[i].id); |
| | | } |
| | | const res = await dataQuery_deletes({ ids: std.toString() }); |
| | | if(res.code != 200){ |
| | | this.$message.error('文件删除失败'); |
| | | } |
| | | this.getAttacthFlieList(); |
| | | }, |
| | | setAttachInsert() { |
| | | var token = getToken(); |
| | | var fs = document.getElementById("insertFile"); |
| | | if (fs.files.length == 0) { |
| | | alert("请选择要上传的文件!"); |
| | | return; |
| | | } |
| | | const formData = new FormData() |
| | | for (var i = 0, c = fs.files.length; i < c; i++) { |
| | | |
| | | formData.append('file', fs.files[i]); // fs.files[i].name,file |
| | | } |
| | | |
| | | $.ajax(BASE_URL + "/dataQuery/uploadFiles?token=" + token + "&tabName=lf.sys_style&eventid=fa25979a5ef8b43ba82a0be35b3fb0d4", { |
| | | type: "post", |
| | | data: formData, |
| | | async: true, |
| | | cache: false, |
| | | processData: false, |
| | | contentType: false, |
| | | success: (rs) => { |
| | | this.$message({ |
| | | message: '附件添加成功', |
| | | type: 'success' |
| | | }); |
| | | document.getElementById("insertFile").value = ""; |
| | | this.formInline = { |
| | | file: '', |
| | | } |
| | | this.getAttacthFlieList(); |
| | | }, |
| | | error: (e) => { |
| | | document.getElementById("insertFile").value = ""; |
| | | this.$message.error('附件添加失败'); |
| | | } |
| | | }); |
| | | }, |
| | | async getAttacthFlieList() { |
| | | var obj = { |
| | | tabName: 'lf.sys_style', |
| | | eventid: 'fa25979a5ef8b43ba82a0be35b3fb0d4' |
| | | } |
| | | const res = await dataQuery_selectFiles(obj); |
| | | if (res.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | return |
| | | } |
| | | this.tableAttach = res.result; |
| | | }, |
| | | |
| | | |
| | | getAttachTable() { |
| | | this.getAttacthFlieList(); |
| | | this.dialogFormVisible = true; |
| | | }, |
| | | //附件=>文件选择 |
| | | getInsertFile() { |
| | | $('#insertFile').click(); |
| | |
| | | //判断点击是否为子节点 |
| | | if (data.children != null) return; |
| | | this.listData.name = data.entity; //要查询表格类型; |
| | | |
| | | this.getClickTable = data; |
| | | this.filedsLayer = this.getCollapseDomFiled(); //获取每个表字段名称及阈值 |
| | | //获取table信息 |
| | | this.getCollapseTable(this.filedsLayer); |
| | |
| | | // this.getMetaCount(""); |
| | | // }); |
| | | }) |
| | | .catch(() => {}); |
| | | .catch(() => { }); |
| | | }, |
| | | // 获取多选选中的对象 |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | handleAttatchChange(val) { |
| | | this.attacgSelection = val; |
| | | }, |
| | | // 删除多条 |
| | | DelFormData() { |
| | |
| | | // }); |
| | | // }); |
| | | }) |
| | | .catch(() => {}); |
| | | .catch(() => { }); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | background-color: #216fe6; |
| | | } |
| | | } |
| | | .infoBox { |
| | | .infoBox { |
| | | width: 500px; |
| | | |
| | | position: absolute; |
| | |
| | | color: white; |
| | | .el-card { |
| | | background-color: transparent; |
| | | color: white; |
| | | color: white; |
| | | span { |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | color: white; |
| | | color: white; |
| | | } |
| | | } |
| | | .contentBox { |
| | | margin: 0 aotu 10px; |
| | | p { |
| | | color: white; |
| | | color: white; |
| | | font-size: 14px; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | .elLink{ |
| | | .elLink { |
| | | color: white !important; |
| | | } |
| | | .el-icon-folder-opened{ |
| | | .el-icon-folder-opened { |
| | | color: white; |
| | | } |
| | | |
| | | /deep/ .el-select .el-input__inner { |
| | | border-color: #fff !important; |
| | | } |
| | | /deep/ .el-dialog { |
| | | /deep/ .el-dialog { |
| | | background: #303030; |
| | | } |
| | | /deep/.el-range-editor.is-active, |
| | |
| | | /deep/.el-dialog__title { |
| | | color: white; |
| | | } |
| | | |
| | | } |
| | | </style> |