| | |
| | | <div class="dividing-line"></div> |
| | | <div |
| | | class="table_box" |
| | | style="height:calc(100% - 130px)" |
| | | style="height:calc(100% - 130px); " |
| | | > |
| | | <!-- border--> |
| | | <!-- ref="filterTable"--> |
| | |
| | | :data="tableData" |
| | | style="width: 100% ;" |
| | | border |
| | | height="100% " |
| | | height="100%" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | min-width="180" |
| | | min-width="240" |
| | | :label="$t('common.operate')" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | plain |
| | | size="small" |
| | | @click="getAttachTable(scope.$index, scope.row)" |
| | | style="margin-left: 20px; " |
| | | >{{$t('common.enclosure')}}</el-button> |
| | | <el-button |
| | | plain |
| | | size="small" |
| | | type="info" |
| | | v-if="matchState1(scope, /[]/)" |
| | | @click="getAttributeTable(scope.$index, scope.row)" |
| | | >{{$t('common.attribute')}}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | :title="$t('common.attachinform')" |
| | | :visible.sync="dialogFormVisible" |
| | | > |
| | | <div style="height: 500px; overflow: auto"> |
| | | <div style="height:68vh"> |
| | | <el-form |
| | | :model="formInline" |
| | | class="demo-form-inline" |
| | |
| | | <!-- <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="calc(100% - 100px)" |
| | | 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')" |
| | | /> |
| | | |
| | | <el-table-column |
| | | prop="name" |
| | | :label="$t('common.filePath')" |
| | | /> |
| | | |
| | | </el-table> |
| | | </el-form-item> |
| | | <!-- <el-form-item> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col |
| | | :span="12" |
| | | :offset="8" |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | @click="dialogFormVisible = false" |
| | | >确认</el-button> |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | @click="dialogFormVisible = false" |
| | | >取消</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> --> |
| | | </el-form> |
| | | <el-table |
| | | :data="tableAttach" |
| | | ref="filterTable" |
| | | height="calc(100% - 130px)" |
| | | border |
| | | style="width: 100%" |
| | | @selection-change="handleAttatchChange" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="70" |
| | | /> |
| | | <el-table-column |
| | | width="60" |
| | | type="index" |
| | | :label="$t('common.index')" |
| | | /> |
| | | <el-table-column |
| | | prop="name" |
| | | :label="$t('common.fileNme')" |
| | | /> |
| | | |
| | | <el-table-column |
| | | prop="sizes" |
| | | :label="$t('common.size')" |
| | | :formatter="statSizeChange" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('common.operate')" |
| | | min-width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-link |
| | | v-if="matchState(scope, /[]/)" |
| | | @click="setAttatchDetail(scope.$index, scope.row)" |
| | | class="elLink" |
| | | >{{ $t('common.see') }}</el-link> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | |
| | | <map-sdk v-if='showMapVisible'></map-sdk> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="预览" |
| | | :append-to-body="false" |
| | | :visible.sync="dialog.dialogVisible" |
| | | width="70%" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div |
| | | v-if="dialog.isPdf" |
| | | class="pdfClass" |
| | | > |
| | | <iframe |
| | | :src="dialog.src" |
| | | type="application/x-google-chrome-pdf" |
| | | width="100%" |
| | | height="100%" |
| | | > |
| | | </iframe> |
| | | </div> |
| | | <div |
| | | v-if="dialog.isJpg" |
| | | class="pdfClass" |
| | | > |
| | | <img |
| | | style="width:100%; height:100%" |
| | | :src="dialog.src" |
| | | alt="" |
| | | /> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :title="attribute.name" |
| | | :append-to-body="false" |
| | | :visible.sync="AttributedialogVisible" |
| | | width="70%" |
| | | :close-on-click-modal="false" |
| | | > |
| | | |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | fromSqlflag: false, |
| | | tree: [ |
| | | { |
| | | tabDesc: "基础数据", |
| | | label: "基础数据", |
| | | value: "BD", |
| | | ns: "bd", |
| | | id: 1, |
| | | children: [], |
| | | }, |
| | | { |
| | | id: 2, |
| | | tabDesc: "业务数据", |
| | | label: "业务数据", |
| | | value: "BS", |
| | | ns: "bs", |
| | | children: [], |
| | | }, |
| | | { |
| | | id: 3, |
| | | tabDesc: "元数据", |
| | | label: "元数据", |
| | | value: "MD", |
| | | ns: "md", |
| | | children: [], |
| | | }, |
| | | ], |
| | | tableAttach: [], |
| | | filedsOption: [], |
| | |
| | | eventid: null, |
| | | }, |
| | | filterText: "", |
| | | dialog: { |
| | | dialogVisible: false, |
| | | isPdf: false, |
| | | isJpg: false, |
| | | src: '' |
| | | }, |
| | | AttributedialogVisible: false, |
| | | attribute: { |
| | | name: null, |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | count: 0, |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | getAttributeTable(idnex, row) { |
| | | this.attribute.name = row.workname; |
| | | this.AttributedialogVisible = true; |
| | | }, |
| | | matchState1(state = "", reg) { |
| | | var row = state.row; |
| | | if ( |
| | | this.listData.name == "ssurveyworksite" |
| | | ) { |
| | | return true; |
| | | } |
| | | return false; |
| | | }, |
| | | statSizeChange(row, column) { |
| | | return this.stateFormatSizes(row.sizes) |
| | | }, |
| | | stateFormatSizes(res) { |
| | | if (res >= 1024) { |
| | | const val = parseFloat(res / 1024).toFixed(3); |
| | | return val + ' GB'; |
| | | } else { |
| | | return res + ' MB'; |
| | | } |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.label.indexOf(value) !== -1; |
| | |
| | | this.$store.state.mapPopBoolean = false; |
| | | this.$store.state.mapPopBoxFlag = null; |
| | | }, |
| | | |
| | | refreshAttatchDetail() { |
| | | this.dialog.src = ""; |
| | | this.dialog.dialogVisible = false; |
| | | this.dialog.isPdf = false; |
| | | this.dialog.isJpg = false; |
| | | }, |
| | | //附件查看 |
| | | setAttatchDetail(index, row) { |
| | | |
| | | this.refreshAttatchDetail() |
| | | var name = row.name; |
| | | if (name.indexOf('.pdf') != -1) { |
| | | this.dialog.dialogVisible = true; |
| | | this.dialog.isPdf = true; |
| | | var url = BASE_URL + "/res/downloadForView?guid=" + row.guid + "&token=" + getToken(); |
| | | this.dialog.src = url |
| | | } else if (name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) { |
| | | this.dialog.dialogVisible = true; |
| | | this.dialog.isJpg = true; |
| | | var url = BASE_URL + "/res/downloadForView?guid=" + row.guid + "&token=" + getToken(); |
| | | this.dialog.src = url |
| | | } |
| | | }, |
| | | |
| | | matchState(state = "", reg) { |
| | | var row = state.row; |
| | | var name = row.name; |
| | | |
| | | if (name) { |
| | | if (name.indexOf('.pdf') != -1 || name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) { |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | }, |
| | | |
| | | |
| | | async setAttachDel() { |
| | | var std = []; |
| | | for (var i in this.attacgSelection) { |
| | |
| | | if (data.code != 200) { |
| | | this.$message.error("列表调用失败"); |
| | | } |
| | | var option = data.result; |
| | | var val = data.result; |
| | | |
| | | for (var i in option) { |
| | | var val_Data = option[i]; |
| | | val_Data.id = "1" + i; |
| | | // val_Data.label = val_Data.tabDesc + "(" + val_Data.tab + ")" |
| | | val_Data.label = val_Data.tabDesc; |
| | | option[i].id = parseInt(option[i].id); |
| | | for (var j in this.tree) { |
| | | if (this.tree[j].ns == option[i].ns) { |
| | | this.tree[j].children.push(val_Data); |
| | | } |
| | | // for (var i in option) { |
| | | // var val_Data = option[i]; |
| | | // val_Data.id = "1" + i; |
| | | // // val_Data.label = val_Data.tabDesc + "(" + val_Data.tab + ")" |
| | | // val_Data.label = val_Data.tabDesc; |
| | | // option[i].id = parseInt(option[i].id); |
| | | // for (var j in this.tree) { |
| | | // if (this.tree[j].ns == option[i].ns) { |
| | | // this.tree[j].children.push(val_Data); |
| | | // } |
| | | // } |
| | | |
| | | // } |
| | | var std = []; |
| | | val.filter((item) => { |
| | | if (std.indexOf(item.bak) == -1) { |
| | | std.push(item.bak); |
| | | this.tree.push( |
| | | { |
| | | val: item.bak, |
| | | label: item.tabDesc, |
| | | children: [], |
| | | } |
| | | ) |
| | | } |
| | | // if (option[i].ns == 'bd') { |
| | | }); |
| | | |
| | | // this.tree[0].children.push(val_Data); |
| | | // } else { |
| | | // this.tree[1].children.push(val_Data); |
| | | // } |
| | | } |
| | | this.tree.filter((item) => { |
| | | val.filter((res) => { |
| | | if (item.val === res.bak) { |
| | | res.label = res.tabDesc |
| | | item.children.push(res) |
| | | } |
| | | }) |
| | | }) |
| | | this.handleNodeClick(this.tree[0].children[0]); |
| | | }, |
| | | //授权管理 |
| | |
| | | handleNodeClick(data) { |
| | | //判断点击是否为子节点 |
| | | if (data.children != null) return; |
| | | |
| | | this.listData.name = data.entity; //要查询表格类型; |
| | | this.getClickTable = data; |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = 10; |
| | | |
| | | this.count = 0; |
| | | this.upAttach.tabName = data.ns + "." + data.tab; |
| | | this.filedsLayer = this.getCollapseDomFiled(); //获取每个表字段名称及阈值 |
| | |
| | | border: 1px solid #dcdfe6; |
| | | } |
| | | } |
| | | .pdfClass { |
| | | height: 70vh; |
| | | width: 100%; |
| | | position: relative; |
| | | } |
| | | } |
| | | |
| | | .table_box2 { |