| | |
| | | export function dataQuery_selectByPage(params) { |
| | | return request.get('/dataQuery/selectByPage', { params: params }); |
| | | } |
| | | //数据管理=>数据检索=>文件获取 |
| | | export function dataQuery_selectFiles(params) { |
| | | return request.get('/dataQuery/selectFiles', { params: params }); |
| | | } |
| | | //数据管理=>数据检索=>文件删除 |
| | | export function dataQuery_deletes(params) { |
| | | return request.get('/dataQuery/deletes', { params: params }); |
| | | } |
| | | |
| | | //数据管理=>数据检索=>查询值域信息 |
| | | export function dataQuery_selectDomains(params) { |
| | | return request.get('/dataQuery/selectDomains', { params: params }); |
| | |
| | | export function dataQuery_selectFields(params) { |
| | | return request.get('/dataQuery/selectFields', { params: params }); |
| | | } |
| | | |
| | | //数据管理=>数据检索=>上传文件 |
| | | export function dataQuery_uploadFiles(params) { |
| | | return request.post('/dataQuery/uploadFiles', params); |
| | | } |
| | | //数据管理=>数据检索=>根据ID查询WKT |
| | | export function dataQuerySelectWktById(params) { |
| | | return request.get('/inquiry/selectWktById', { params: params }); |
| | |
| | | export function dataUploadSelectPath(params) { |
| | | return request.get('/dataUpload/selectPath', { params: params }); |
| | | } |
| | | // //数据上传=>文件上传 |
| | | // export function dataUploadinsertFiles(params) { |
| | | //数据上传=>查询文件 |
| | | export function dataUploadSelectFiles(params) { |
| | | return request.get('/dataUpload/selectFiles?path=' + params); |
| | | } |
| | | //数据上传=>删除文件 |
| | | export function dataUploadDeleteFiles(params) { |
| | | return request.post('/dataUpload/deleteFiles', params); |
| | | } |
| | | //数据上传=>数据入库 |
| | | export function dataUploadInsertFiles(params) { |
| | | return request.post('/dataUpload/insertFiles', params); |
| | | } |
| | | |
| | | //数据入库=>获取目录树 |
| | | export function dataLoader_selectDirAll(params) { |
| | | return request.get('/dataLoader/selectDirAll', { params: params }); |
| | | } |
| | | //数据入库=>查询单位 |
| | | export function dataLoader_selectDepAll(params) { |
| | | return request.get('/dataLoader/selectDepAll', { params: params }); |
| | | } |
| | | //数据入库=>获取文件上传路径 |
| | | export function dataLoader_selectPath(params) { |
| | | return request.get('/dataLoader/selectPath', { params: params }); |
| | | } |
| | | //数据入库=>获取版本Id |
| | | export function dataLoader_selectVerByDirid(params) { |
| | | return request.get('/dataLoader/selectVerByDirid', { params: params }); |
| | | } |
| | | //数据入库=>获取文件上传路径 |
| | | export function dataLoader_selectFiles(params) { |
| | | return request.get('/dataLoader/selectFiles?path=' + params); |
| | | } |
| | | //数据入库=>获取查询映射 |
| | | export function dataLoader_selectMappers(params) { |
| | | return request.get('/dataLoader/selectMappers?path=' + params); |
| | | } |
| | | //数据入库=>查询所有表 |
| | | export function dataLoader_SelectTabs(params) { |
| | | return request.get('/dataLoader/selectTabs', { params: params }); |
| | | } |
| | | |
| | | // //数据入库=>查询文件 |
| | | // export function dataLoader_selectDirAll(params) { |
| | | // return request.get('/dataUpload/selectFiles?path=' + params); |
| | | // } |
| | | // //数据入库=>删除文件 |
| | | // export function dataLoader_selectDirAll(params) { |
| | | // return request.post('/dataUpload/deleteFiles', params); |
| | | // } |
| | | // //数据入库=>数据入库 |
| | | // export function dataLoader_selectDirAll(params) { |
| | | // return request.post('/dataUpload/insertFiles', params); |
| | | // } |
| | | |
| | |
| | | fileNme: 'File Name', |
| | | format: 'format', |
| | | size: 'size', |
| | | versionName: 'version Name', |
| | | type: 'type', |
| | | }, |
| | | dataManage: { |
| | | dataManage: 'Data Manage', |
| | |
| | | enable: 'Start Using', |
| | | addStyleData: 'Add Style Data', |
| | | deInformation: 'Detailed Information', |
| | | modifyStyleData: 'Modify Style Data', |
| | | }, |
| | | }, |
| | | operatManage: { |
| | |
| | | |
| | | format: '格式', |
| | | size: '大小', |
| | | versionName: '版本名称', |
| | | type: '类型', |
| | | }, |
| | | dataManage: { |
| | | dataManage: '数据管理', |
| | |
| | | enable: '启用', |
| | | addStyleData: '添加样式数据', |
| | | |
| | | modifyStyleData: '修改样式数据', |
| | | deInformation: '详细信息', |
| | | }, |
| | | }, |
| | |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | } |
| | | debugger; |
| | | |
| | | var val_Data = data.result; |
| | | for (var i in val_Data) { |
| | | var valste = val_Data[i]; |
| | |
| | | var cartographic = Cesium.Cartographic.fromCartesian(position); |
| | | let lng = Cesium.Math.toDegrees(cartographic.longitude); |
| | | let lat = Cesium.Math.toDegrees(cartographic.latitude); |
| | | this.$emit("fromChlid", { lng, lat }); |
| | | this.$emit('fromChlid', { lng, lat }); |
| | | if (this.entity !== null) { |
| | | this.entity.position = Cesium.Cartesian3.fromDegrees(lng, lat); |
| | | } else { |
| | |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.viewer = new Cesium.Viewer("cesiumContainer", { |
| | | this.viewer = new Cesium.Viewer('cesiumContainer', { |
| | | animation: false, //是否创建动画小器件,左下角仪表 |
| | | baseLayerPicker: false, //是否显示图层选择器 |
| | | fullscreenButton: false, //是否显示全屏按钮 |
| | |
| | | scene3DOnly: true, //如果设置为true,则所有几何图形以3D模式绘制以节约GPU资源 |
| | | CreditsDisplay: false, //展示数据版权属性 |
| | | imageryProvider: new Cesium.UrlTemplateImageryProvider({ |
| | | url: "./earth/{z}/{x}/{reverseY}.jpeg", |
| | | url: './earth/{z}/{x}/{reverseY}.jpeg', |
| | | minimumLevel: 0, |
| | | maximumLevel: 6, |
| | | }), |
| | |
| | | // // url: 'http://103.85.171.154:60080/gisserver/tmsserver/earth_tms/{z}/{x}/{reverseY}.jpeg"' |
| | | // // }), |
| | | }); |
| | | this.viewer._cesiumWidget._creditContainer.style.display = "none"; |
| | | this.viewer._cesiumWidget._creditContainer.style.display = 'none'; |
| | | this.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas); |
| | | var urls1 = `./beijingmtg`; |
| | | var urls2 = `./map`; |
| | |
| | | // "" |
| | | // ); |
| | | var urlTemplateImageryProvider = new Cesium.UrlTemplateImageryProvider({ |
| | | url: urls1 + "/{z}/{x}/{y}.png", |
| | | url: urls1 + '/{z}/{x}/{y}.png', |
| | | }); |
| | | this.viewer.imageryLayers.addImageryProvider(urlTemplateImageryProvider); |
| | | |
| | |
| | | }, |
| | | makeBill(lng, lat) { |
| | | this.entity = this.viewer.entities.add({ |
| | | name: "点", |
| | | name: '点', |
| | | position: Cesium.Cartesian3.fromDegrees(lng, lat), |
| | | billboard: { |
| | | image: "./img/jjd.png", |
| | | image: './img/jjd.png', |
| | | scale: 1, |
| | | distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0.1), |
| | | verticalOrigin: Cesium.VerticalOrigin.BOTTOM, //垂直位置 |
| | |
| | | }, |
| | | //重新绘制对象 |
| | | redrawPlotting(node) { |
| | | // debugger; |
| | | this.element = node; |
| | | if (this.element.type == "polyline") { |
| | | if (this.element.type == 'polyline') { |
| | | //定义折线几何 |
| | | var mypolyline = new Cesium.PolylineGraphics({ |
| | | positions: Cesium.Cartesian3.fromDegreesArray(this.element.positions), |
| | |
| | | // range: alt, |
| | | // }, |
| | | }); |
| | | } else if (this.element.type == "label") { |
| | | } else if (this.element.type == 'label') { |
| | | let entity = this.viewer.entities.add({ |
| | | name: this.element.name, |
| | | position: Cesium.Cartesian3.fromDegrees( |
| | |
| | | ); |
| | | } |
| | | // this.viewer.Creator.SimpleGraphic.SimpleGraphicObj.push(entity.id); |
| | | } else if (this.element.type == "billboard") { |
| | | } else if (this.element.type == 'billboard') { |
| | | let entity = this.viewer.entities.add({ |
| | | name: this.element.name, |
| | | position: Cesium.Cartesian3.fromDegrees( |
| | |
| | | // range: alt, |
| | | // }, |
| | | }); |
| | | if (this.element.width != "") |
| | | if (this.element.width != '') |
| | | entity.billboard.width = this.element.width; |
| | | if (this.element.height != "") |
| | | if (this.element.height != '') |
| | | entity.billboard.width = this.element.height; |
| | | if (this.element.rotate != "") |
| | | if (this.element.rotate != '') |
| | | entity.billboard.rotation = this.element.rotate; |
| | | // this.viewer.Creator.SimpleGraphic.SimpleGraphicObj.push(entity.id); |
| | | } else if (this.element.type == "polygon") { |
| | | } else if (this.element.type == 'polygon') { |
| | | var myPolygon1 = new Cesium.PolygonGraphics({ |
| | | hierarchy: Cesium.Cartesian3.fromDegreesArray(this.element.positions), |
| | | material: new Cesium.Color( |
| | |
| | | }); |
| | | if (this.element.isborder) { |
| | | polygonshow.polygon.outline = true; |
| | | if (this.element.bordersize == "") |
| | | if (this.element.bordersize == '') |
| | | polygonshow.polygon.outlineWidth = 1; |
| | | else polygonshow.polygon.outlineWidth = this.element.bordersize; |
| | | polygonshow.polygon.outlineColor = new Cesium.Color( |
| | |
| | | } |
| | | // this.viewer.Creator.SimpleGraphic.SimpleGraphicObj.push(polygonshow.id); |
| | | } else if ( |
| | | this.element.type == "SwallowtailArrow" || |
| | | this.element.type == "StraightArrow" || |
| | | this.element.type == "PincerArrow" || |
| | | this.element.type == "GatheringPlace" |
| | | this.element.type == 'SwallowtailArrow' || |
| | | this.element.type == 'StraightArrow' || |
| | | this.element.type == 'PincerArrow' || |
| | | this.element.type == 'GatheringPlace' |
| | | ) { |
| | | var myPolygon1 = new Cesium.PolygonGraphics({ |
| | | hierarchy: Cesium.Cartesian3.fromDegreesArray(this.element.positions), |
| | |
| | | ); |
| | | } else { |
| | | model.setFlattenByGeojson(true, fileURL).then((data) => { |
| | | debugger; |
| | | data.forEach((item) => { |
| | | this.addTreeNode(item); |
| | | }); |
| | |
| | | >{{$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> |
| | |
| | | this.ruleForm = {}; |
| | | this.dialogFormVisible = false; |
| | | this.$refs[formName].resetFields(); |
| | | this.getDirTree(); |
| | | } |
| | | }, 500); |
| | | }) |
| | |
| | | import dictionaryManage from '@/views/datamanage/dictionaryManage.vue'; //数据管理-字典管理 |
| | | import metadataManage from '@/views/datamanage/metadataManage.vue'; //数据管理-元数据管理 |
| | | import styleManage from '@/views/datamanage/styleManage.vue'; //数据管理-样式管理 |
| | | import dataLoader from '@/views/datamanage/dataLoader.vue'; // |
| | | import dataLoader from '@/views/datamanage/dataLoader.vue'; //数据管理-数据入库 |
| | | export default { |
| | | components: { |
| | | customElMenu, |
| | |
| | | var data = e.$attrs.perms; |
| | | this.$store.state.currentPerms = data.perms; |
| | | var index = data.url; |
| | | debugger; |
| | | |
| | | if (index != null) { |
| | | if (index.indexOf('http') != -1) { |
| | | this.$store.commit('getIframe', data.url); |
| | |
| | | <el-form :inline="true" :model="formInline" class="demo-form-inline"> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.catalogue')"> |
| | | <el-cascader |
| | | v-model="formInline.catalog" |
| | | v-model="formInline.dirid" |
| | | :options="catalogOption" |
| | | @change="catalogChange" |
| | | :props="cascader" |
| | |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.company')"> |
| | | <el-cascader |
| | | v-model="formInline.company" |
| | | v-model="formInline.depid" |
| | | :options="companyOption" |
| | | @change="companyChange" |
| | | :props="cascader" |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.versionNo')"> |
| | | <el-select v-model="formInline.verid" :placeholder="$t('common.choose')"> |
| | | <el-option |
| | | v-for="item in verOption" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.entryTime')"> |
| | | <el-date-picker |
| | | v-model.trim="formInline.monitorTime" |
| | | v-model.trim="formInline.gather" |
| | | :picker-options="pickerOptions" |
| | | type="datetime" |
| | | placeholder="请选择" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <input id="uploadfile" @change= "handleFileChange" type="file" name="file" multiple="multiple" style="display: none"></input> |
| | | <input id="uploadfile" @change= "handleFileChange" type="file" name="file" multiple="multiple" accept=".xls,.xlsx,.mdb,.shp.zip,.gdb.zip" style="display: none"></input> |
| | | <el-button icon="el-icon-document-add" @click="fileSelect" class="primary">{{ |
| | | $t('common.file') |
| | | }}</el-button> |
| | |
| | | <el-form-item :label="$t('dataManage.dataUpObj.describe')"> |
| | | <el-input |
| | | type="textarea" |
| | | v-model="formInline.desc" |
| | | v-model="formInline.descr" |
| | | maxlength="50" |
| | | class="nm-skin-pretty" |
| | | show-word-limit |
| | | :rows="2" resize='none' |
| | | :rows="2" resize='none' |
| | | style="width: 460px" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button icon="el-icon-upload" @click="setFileUpload" |
| | | |
| | | type="success">{{ |
| | | $t('common.upload') |
| | | }}</el-button> |
| | |
| | | :data="tableData" |
| | | border |
| | | style="width: 100%" |
| | | height="92%" |
| | | height="99%" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column |
| | |
| | | width="70px" |
| | | fixed |
| | | /> |
| | | |
| | | <el-table-column |
| | | <el-table-column |
| | | align="center" |
| | | prop="name" |
| | | :label="$t('userManage.userInfoObj.uname')" |
| | | :label="$t('common.name')" |
| | | fixed |
| | | /> |
| | | |
| | | </el-table> |
| | | <div style="margin-top: 10px" class="pagination_box"> |
| | | <!-- <div style="margin-top: 10px" class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | |
| | | :total="count" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | |
| | | </div> |
| | | <!-- --> |
| | | <el-dialog |
| | | :title="$t('dataManage.datawarehousing')" |
| | | :visible.sync="dialogWarehousing" |
| | | width="50%" |
| | | :before-close="handleWareClose" |
| | | > |
| | | <div class="dialogBox"> |
| | | <div class="transFarBox"> |
| | | <ul> |
| | | <li @click="singleElection(item)" v-for="(item, i) in tableWareOne" :class="{ active: activeName == item.tab }">{{item.tab}} ({{item.type}})</li> |
| | | </ul> |
| | | </div> |
| | | <div class="tarnsbtton"> |
| | | <div><div style="padding:2%"> <el-link><i class="el-icon-plus"></i></el-link></div></div> |
| | | |
| | | |
| | | </div> |
| | | <div class="transFarBox"> |
| | | <ul> |
| | | <li @click="singleElection2(item)" v-for="(item, i) in tableWareTwo" :class="{ active: activeName2 == item.entity }">{{item.tabDesc}} ( {{item.tab}})</li> |
| | | </ul> |
| | | </div> |
| | | <div class="tarnsbtton"> |
| | | <div><div style="padding:2%"> <el-link @click="setWareTableChangeLeft" ><i class="el-icon-d-arrow-left"></i></el-link></div><br/> <div style="padding:2%"> |
| | | <el-link><i class="el-icon-d-arrow-right" @click="setWareTableChangeRight"></i></el-link></div></div> |
| | | </div> |
| | | <div class="transFarBox"> |
| | | <ul> |
| | | <li @click="singleElection3(i)" v-for="(item, i) in tableWareThree" :class="{ active: activeName3 ==( item.tab+i)}">{{item.tab}} ( {{item.tabDesc}}:{{item.entity}} )</li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button class="primary" @click="autoMatchWare">自动匹配</el-button> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button class="primary" @click="setInsrtWareTable">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import $ from 'jquery'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import { selectdirTab, queryDepTree } from '../../api/api'; |
| | | import { getToken } from '@/utils/auth'; |
| | | import { |
| | | dataLoader_selectDirAll, |
| | | dataLoader_selectDepAll, |
| | | dataLoader_selectPath, |
| | | dataLoader_selectVerByDirid, |
| | | dataLoader_selectFiles, |
| | | dataUploadDeleteFiles, |
| | | dataUploadInsertFiles, |
| | | dataLoader_selectMappers, |
| | | dataLoader_SelectTabs |
| | | } from '../../api/api'; |
| | | export default { |
| | | name: 'dataUpdata', |
| | | components: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | wareStatus: false, |
| | | dialogWarehousing: false, |
| | | btnStatus: 0, |
| | | count: 0, |
| | | formInline: { |
| | | monitorTime: '', |
| | | verid: '', |
| | | gather: '', |
| | | }, |
| | | tableWareOne: [], |
| | | tableWareTwo: [], |
| | | catalogOption: [], |
| | | companyOption: [], |
| | | tableData: [], |
| | | listTable: [], |
| | | listTableWare: [], |
| | | tableWareThree: [], |
| | | multipleSelection: [], |
| | | fullscreenLoading: false, |
| | | listData: { |
| | |
| | | }, |
| | | selectableRange: '00:00:00 - 23:59:59', |
| | | }, |
| | | verOption: [], |
| | | cascader: { |
| | | label: 'name', |
| | | value: 'id', |
| | |
| | | checkStrictly: true, |
| | | emitPath: false, |
| | | }, |
| | | wareSelectOne: null, |
| | | wareSelectTwo: null, |
| | | listWare: [], |
| | | activeName: '', |
| | | activeName2: '', |
| | | activeName3: '', |
| | | wareTableFlag: null, |
| | | }; |
| | | }, |
| | | |
| | |
| | | this.getQueryDepTree(); |
| | | this.timeDefault(); |
| | | this.getFilePath(); |
| | | |
| | | }, |
| | | watch: { |
| | | 'detailData.monitorTime': { |
| | | 'detailData.gather': { |
| | | handler(newValue, oldValue) { |
| | | if (newValue) { |
| | | let date = new Date(); |
| | |
| | | ) { |
| | | let hh1 = moment(newValue).format('HH:mm:ss'); |
| | | if (hh1 > nowDate) { |
| | | this.detailData.monitorTime = new Date(); |
| | | this.detailData.gather = new Date(); |
| | | } |
| | | st = nowDate; |
| | | } else { |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | //文件上传 |
| | | setFileUpload() { |
| | | this.handlerLoading(true); |
| | | setTimeout(() => { |
| | | this.handlerLoading(false); |
| | | }, 2000); |
| | | async setInsrtWareTable(){ |
| | | var obj = { |
| | | metaEntity: this.formInline, |
| | | fileEntities: this.tableWareThree |
| | | }; |
| | | debugger |
| | | const res = await dataUploadInsertFiles(JSON.stringify(obj)); |
| | | if (res.code != 200) { |
| | | this.$message.error('数据入库失败'); |
| | | return; |
| | | }else{ |
| | | debugger |
| | | this.$message({ |
| | | message: '数据入库成功', |
| | | type: 'success' |
| | | }); |
| | | this.dialogWarehousing = false; |
| | | this.getFileLength(); |
| | | this.setClearAttartch(); |
| | | } |
| | | |
| | | this.getFileLength(); |
| | | }, |
| | | setClearAttartch(){ |
| | | this.activeName = ''; |
| | | this.activeName2 = ''; |
| | | this.activeName3 = ''; |
| | | this.tableWareThree =[]; |
| | | this.tableWareTwo=[]; |
| | | this.tableWareOne=[]; |
| | | }, |
| | | autoMatchWare() { |
| | | var val1 = this.tableWareOne; |
| | | var val2 = this.tableWareTwo; |
| | | var std = []; |
| | | for (var i = 0; i < val1.length; i++) { |
| | | |
| | | const stdTab = this.setSplitWare(val1[i].tab) |
| | | for (var j = 0; j < val2.length; j++) { |
| | | if (val2[j].tab == stdTab) { |
| | | std.push(val1[i].tab) |
| | | val1[i].entity = val2[j].entity; |
| | | val1[i].tabDesc= val2[j].tabDesc; |
| | | this.tableWareThree.push(val1[i]); |
| | | } |
| | | } |
| | | } |
| | | std.forEach(item => { |
| | | this.tableWareOne = this.tableWareOne.filter(items => items.tab!== item); |
| | | }); |
| | | |
| | | }, |
| | | setSplitWare(res) { |
| | | if (res.indexOf(".shp") != -1) { |
| | | return res.split(".shp").join(""); |
| | | }else if (res.indexOf(".mdb") != -1){ |
| | | return res.split(".mdb").join(""); |
| | | }else if (res.indexOf(".gdb") != -1){ |
| | | return res.split(".gdb").join(""); |
| | | }else{ |
| | | return res; |
| | | } |
| | | }, |
| | | handleWareClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | done(); |
| | | this.setClearAttartch(); |
| | | }) |
| | | .catch(_ => { }); |
| | | }, |
| | | setWareTableChangeLeft() { |
| | | var res = this.wareTableFlag; |
| | | var value1 = this.tableWareThree[res]; |
| | | value1.entity = null; |
| | | value1.tabDesc= null; |
| | | this.tableWareOne.push(value1); |
| | | this.tableWareThree.splice(res, 1) |
| | | this.activeName = ''; |
| | | this.activeName2 = ''; |
| | | this.activeName3 = ''; |
| | | }, |
| | | setWareTableChangeRight() { |
| | | |
| | | this.wareSelectOne.entity = this.wareSelectTwo.entity; |
| | | this.wareSelectOne.tabDesc = this.wareSelectTwo.tabDesc; |
| | | |
| | | this.tableWareThree.push(this.wareSelectOne) |
| | | |
| | | this.tableWareOne.forEach((value, index, array) => { |
| | | if (value.tab == this.wareSelectOne.tab) { |
| | | this.tableWareOne.splice(index, 1) |
| | | } |
| | | |
| | | }) |
| | | this.activeName = ''; |
| | | this.activeName2 = ''; |
| | | this.activeName3 = ''; |
| | | }, |
| | | singleElection(row) { |
| | | this.wareSelectOne = row; |
| | | this.activeName = row.tab |
| | | |
| | | }, |
| | | singleElection2(row) { |
| | | this.wareSelectTwo = row; |
| | | this.activeName2 = row.entity |
| | | |
| | | }, |
| | | singleElection3(res) { |
| | | |
| | | this.wareTableFlag = res; |
| | | this.activeName3 = this.tableWareThree[res].tab + res; |
| | | |
| | | }, |
| | | |
| | | //查询所有的表 |
| | | async getDataLoaderSelectTabs() { |
| | | const res = await dataLoader_SelectTabs(); |
| | | if (res.code != 200) { |
| | | this.$message.error('数据请求失败'); |
| | | return; |
| | | } |
| | | this.tableWareTwo = res.result; |
| | | }, |
| | | //查询映射 |
| | | async getDataLoaderSelectMappers(res) { |
| | | const data = await dataLoader_selectMappers(res); |
| | | |
| | | if (data.code != 200) { |
| | | this.$message.error('数据请求失败'); |
| | | return; |
| | | } |
| | | debugger |
| | | this.tableWareOne = data.result; |
| | | }, |
| | | //数据删除 |
| | | setFileDelete() { |
| | | async setFileDelete() { |
| | | this.handlerLoading(true); |
| | | |
| | | |
| | | |
| | | this.multipleSelection.forEach(item => { |
| | | this.listTable = this.listTable.filter((items) => { |
| | | |
| | | if (items.name != item.name && item.id != items.id) { |
| | | return items; |
| | | } |
| | | |
| | | }); |
| | | }); |
| | | this.listData.pageIndex= 1; |
| | | this.listData.pageSize = 10; |
| | | this.count = this.listTable.length; |
| | | this.setViewTable(); |
| | | var data = JSON.stringify(this.multipleSelection); |
| | | const res = await dataUploadDeleteFiles(data); |
| | | if (res.code != 200) { |
| | | this.$message.error('删除失败'); |
| | | return; |
| | | } |
| | | this.getFileLength(); |
| | | |
| | | |
| | | |
| | | this.handlerLoading(false); |
| | | }, |
| | | //数据入库 |
| | | setFileWare() { |
| | | this.handlerLoading(true); |
| | | setTimeout(() => { |
| | | this.handlerLoading(false); |
| | | }, 2000); |
| | | this.getFilePath(); |
| | | async setFileWare() { |
| | | this.tableWareThree = []; |
| | | this.listTableWare = []; |
| | | this.getDataLoaderSelectTabs(); |
| | | this.getDataLoaderSelectMappers(this.formInline.path); |
| | | this.dialogWarehousing = true; |
| | | // if(this.multipleSelection.length==0){ |
| | | // this.$message.error('请选择要入库的数据'); |
| | | // return |
| | | // } |
| | | // var obj = { |
| | | // metaEntity: this.formInline, |
| | | // fileEntities: this.multipleSelection |
| | | // }; |
| | | |
| | | // const res = await dataUploadInsertFiles(JSON.stringify(obj)); |
| | | |
| | | // if (res.code != 200) { |
| | | // this.$message.error('文件入库失败'); |
| | | // return; |
| | | // } |
| | | |
| | | // |
| | | |
| | | }, |
| | | //获取文件上传路径 |
| | | getFilePath() { |
| | | for (var i = 0; i < 20; i++) { |
| | | this.listTable.push({ |
| | | id: i, |
| | | name: 'value' + i |
| | | }) |
| | | } |
| | | this.count = this.listTable.length; |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = 10; |
| | | this.setViewTable(); |
| | | }, |
| | | |
| | | //显示表格数据 |
| | | setViewTable() { |
| | | var index = this.listData.pageIndex - 1; |
| | |
| | | if (this.listTable[i] != null) { |
| | | std.push(this.listTable[i]) |
| | | } |
| | | |
| | | } |
| | | |
| | | this.tableData = std; |
| | | }, |
| | | //获取文件上传数据 |
| | | getFileLength() { |
| | | //文件上传 |
| | | setFileUpload() { |
| | | this.handlerLoading(true); |
| | | var token = getToken(); |
| | | var formData = new FormData(); |
| | | |
| | | |
| | | var fs = document.getElementById("uploadfile"); |
| | | for (var i = 0, c = fs.files.length; i < c; i++) { |
| | | formData.append(fs.files[i].name, fs.files[i]); // fs.files[i].name,file |
| | | } |
| | | |
| | | |
| | | $.ajax(BASE_URL + "/dataLoader/uploadFiles?token=" + token + "&path=" + this.formInline.path, { |
| | | type: "post", |
| | | data: formData, |
| | | async: true, |
| | | cache: false, |
| | | processData: false, |
| | | contentType: false, |
| | | success: (rs) => { |
| | | |
| | | this.getFileLength(); |
| | | |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | |
| | | }, |
| | | error: (rs) => { |
| | | alert("上传文件失败!"); |
| | | } |
| | | }); |
| | | |
| | | this.handlerLoading(false); |
| | | }, |
| | | //获取文件上传数据 |
| | | async getFileLength() { |
| | | const res = await dataLoader_selectFiles(this.formInline.path); |
| | | if (res.code != 200) { |
| | | this.$message.error('文件上传数据获取失败'); |
| | | return; |
| | | } |
| | | |
| | | if (res.result == null) { |
| | | this.count = 0; |
| | | this.setClearTableData(); |
| | | } else { |
| | | this.count = res.result.length; |
| | | this.tableData = res.result; |
| | | } |
| | | |
| | | |
| | | // this.listData.pageIndex = 1; |
| | | // this.listData.pageSize = 10; |
| | | // this.setViewTable(); |
| | | }, |
| | | //清除表格信息 |
| | | setClearTableData() { |
| | | this.tableData = []; |
| | | this.listTable = []; |
| | | }, |
| | | |
| | | |
| | | //分页控制 |
| | | handleSizeChange(res) { |
| | | this.listData.pageIndex = 1; |
| | |
| | | $("#uploadfile").click(); |
| | | }, |
| | | handleFileChange() { |
| | | var val = document.getElementById("uploadfile").files; |
| | | if (!val || !val.length) return; |
| | | var formData = new FormData(); |
| | | for (var i = 0; i < val.length; i++) { |
| | | formData.append(val[i].name, val[i]); |
| | | } |
| | | console.log(formData) |
| | | var fs = document.getElementById("uploadfile"); |
| | | |
| | | }, |
| | | //当前时间获取 |
| | | timeDefault() { |
| | |
| | | minutes + |
| | | sign2 + |
| | | seconds; |
| | | this.formInline.monitorTime = s1; |
| | | this.formInline.gather = s1; |
| | | }, |
| | | |
| | | //Loading显隐 |
| | |
| | | }, |
| | | //目录切换 |
| | | catalogChange(value) { |
| | | this.formInline.catalog = value; |
| | | this.formInline.dirid = value; |
| | | this.getselectVerByDirid(); |
| | | }, |
| | | //单位切换 |
| | | companyChange(value) { |
| | | this.formInline.company = value; |
| | | this.formInline.depid = value; |
| | | }, |
| | | |
| | | //单位列表获取 |
| | | async getQueryDepTree() { |
| | | const res = await queryDepTree(); |
| | | //获取文件上传路径 |
| | | async getFilePath() { |
| | | const res = await dataLoader_selectPath(); |
| | | if (res.code != 200) { |
| | | this.$message.error('单位列表获取失败'); |
| | | return; |
| | | } |
| | | this.formInline.company = 1; |
| | | this.formInline.path = res.result; |
| | | }, |
| | | //单位列表获取 |
| | | async getQueryDepTree() { |
| | | const res = await dataLoader_selectDepAll(); |
| | | if (res.code != 200) { |
| | | this.$message.error('单位列表获取失败'); |
| | | return; |
| | | } |
| | | this.formInline.depid = 1; |
| | | this.companyOption = this.treeData(res.result); |
| | | }, |
| | | //版本号获取 |
| | | async getselectVerByDirid() { |
| | | this.verOption = []; |
| | | this.formInline.verid = ""; |
| | | const res = await dataLoader_selectVerByDirid(this.formInline.dirid); |
| | | |
| | | if (res.code != 200) { |
| | | this.$message.error('版本列表获取失败'); |
| | | return; |
| | | } |
| | | this.verOption = res.result; |
| | | this.formInline.verid = res.result[0].id; |
| | | }, |
| | | |
| | | |
| | | //目录列表获取 |
| | | async getSelectdirTab() { |
| | | const res = await selectdirTab(); |
| | | const res = await dataLoader_selectDirAll(); |
| | | if (res.code != 200) { |
| | | this.$message.error('目录列表获取失败'); |
| | | return; |
| | | } |
| | | this.formInline.catalog = 1; |
| | | this.formInline.dirid = 1; |
| | | this.catalogOption = this.treeData(res.result); |
| | | this.getselectVerByDirid() |
| | | }, |
| | | //树列表生成 |
| | | treeData(source) { |
| | |
| | | /deep/.btn-next { |
| | | background: transparent; |
| | | } |
| | | /deep/.btn-next i { |
| | | color:white; |
| | | /deep/.btn-next i { |
| | | color: white; |
| | | } |
| | | /deep/.btn-prev i { |
| | | color:white; |
| | | color: white; |
| | | } |
| | | } |
| | | } |
| | |
| | | /deep/.el-loading-spinner i { |
| | | color: #1890ff !important; |
| | | } |
| | | /deep/ .el-dialog { |
| | | background: #303030; |
| | | } |
| | | /deep/.el-range-editor.is-active, |
| | | .el-range-editor.is-active:hover, |
| | | .el-select .el-input.is-focus .el-input__inner { |
| | | border: 1px solid; |
| | | } |
| | | /deep/.el-dialog__title { |
| | | color: white; |
| | | } |
| | | .dialogBox { |
| | | width: 100%; |
| | | height: 500px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .transFarBox { |
| | | width: 30%; |
| | | height: 100%; |
| | | border: 1px solid white; |
| | | border-radius: 5px; |
| | | max-height: 500px; |
| | | overflow-y: auto; |
| | | li { |
| | | color: white; |
| | | border-bottom: 1px solid white; |
| | | line-height: 30px; |
| | | text-align: center; |
| | | } |
| | | li:hover { |
| | | background: rgba(255, 255, 255, 0.3); |
| | | } |
| | | .active { |
| | | color: #409eff; |
| | | } |
| | | } |
| | | .tarnsbtton { |
| | | width: 6%; |
| | | height: 100%; |
| | | |
| | | /*flex 布局*/ |
| | | display: flex; |
| | | /*实现垂直居中*/ |
| | | align-items: center; |
| | | /*实现水平居中*/ |
| | | justify-content: center; |
| | | } |
| | | } |
| | | .el-icon-d-arrow-right { |
| | | color: white; |
| | | } |
| | | .el-icon-d-arrow-left { |
| | | color: #fff; |
| | | } |
| | | .el-icon-plus { |
| | | color: white; |
| | | } |
| | | /*修改table 表体的背景颜色和文字颜色*/ |
| | | /deep/ .el-table { |
| | | background-color: transparent; |
| | | |
| | | th, |
| | | td { |
| | | background-color: transparent; |
| | | } |
| | | .el-table__expanded-cell { |
| | | background-color: transparent !important; |
| | | } |
| | | |
| | | // 表头背景色 |
| | | th.el-table__cell { |
| | | background-color: #303030 !important; |
| | | color: #fff; |
| | | } |
| | | tr > td { |
| | | background-color: #303030 !important; |
| | | color: #fff; |
| | | } |
| | | |
| | | // hover效果 |
| | | tr:hover > td { |
| | | background-color: rgba(255, 255, 255, 0.3) !important; |
| | | } |
| | | |
| | | tbody tr:hover { |
| | | background-color: rgba(255, 255, 255, 0.3) !important; |
| | | // text-align: center; |
| | | } |
| | | |
| | | // 滚动条宽高 |
| | | .el-table__body-wrapper::-webkit-scrollbar { |
| | | width: 5px; |
| | | height: 5px; |
| | | } |
| | | |
| | | .el-table__body-wrapper::-webkit-scrollbar { |
| | | width: 5px; |
| | | /*滚动条宽度*/ |
| | | height: 5px; |
| | | /*滚动条高度*/ |
| | | } |
| | | /*定义滚动条轨道 内阴影+圆角*/ |
| | | .el-table__body-wrapper::-webkit-scrollbar-track { |
| | | box-shadow: 0px 1px 3px #216fe6 inset; |
| | | /*滚动条的背景区域的内阴影*/ |
| | | border-radius: 10px; |
| | | } |
| | | |
| | | /*定义滑块 内阴影+圆角*/ |
| | | .el-table__body-wrapper::-webkit-scrollbar-thumb { |
| | | box-shadow: 0px 1px 3px #216fe6 inset; |
| | | border-radius: 6px; |
| | | background-color: #216fe6; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | maxlength="50" |
| | | class="nm-skin-pretty" |
| | | show-word-limit |
| | | :rows="2" resize='none' |
| | | :rows="2" resize='none' |
| | | style="width: 460px" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | :data="tableData" |
| | | border |
| | | style="width: 100%" |
| | | height="92%" |
| | | height="99%" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column |
| | |
| | | <el-table-column |
| | | align="center" |
| | | prop="name" |
| | | :label="$t('userManage.userInfoObj.uname')" |
| | | :label="$t('common.name')" |
| | | fixed |
| | | /> |
| | | </el-table> |
| | | <div style="margin-top: 10px" class="pagination_box"> |
| | | <!-- <div style="margin-top: 10px" class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | |
| | | :total="count" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | <script> |
| | | import $ from 'jquery'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import { removeToken, getToken } from '@/utils/auth'; |
| | | import { selectdirTab, queryDepTree,dataUploadSelectVerByDirid,dataUploadSelectPath } from '../../api/api'; |
| | | import { getToken } from '@/utils/auth'; |
| | | import { selectdirTab, queryDepTree,dataUploadSelectVerByDirid,dataUploadSelectPath,dataUploadSelectFiles,dataUploadDeleteFiles,dataUploadInsertFiles} from '../../api/api'; |
| | | export default { |
| | | name: 'dataUpdata', |
| | | components: { |
| | |
| | | methods: { |
| | | |
| | | //数据删除 |
| | | setFileDelete() { |
| | | async setFileDelete() { |
| | | this.handlerLoading(true); |
| | | var data = JSON.stringify(this.multipleSelection); |
| | | const res = await dataUploadDeleteFiles(data); |
| | | if (res.code != 200) { |
| | | this.$message.error('删除失败'); |
| | | return; |
| | | } |
| | | this.getFileLength(); |
| | | |
| | | |
| | | |
| | | this.multipleSelection.forEach(item => { |
| | | this.listTable = this.listTable.filter((items) => { |
| | | |
| | | if (items.name != item.name && item.id != items.id) { |
| | | return items; |
| | | } |
| | | |
| | | }); |
| | | }); |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = 10; |
| | | this.count = this.listTable.length; |
| | | this.setViewTable(); |
| | | this.getFileLength(); |
| | | this.handlerLoading(false); |
| | | }, |
| | | //数据入库 |
| | | setFileWare() { |
| | | this.handlerLoading(true); |
| | | setTimeout(() => { |
| | | this.handlerLoading(false); |
| | | }, 2000); |
| | | this.getFilePath(); |
| | | async setFileWare() { |
| | | if(this.multipleSelection.length==0){ |
| | | this.$message.error('请选择要入库的数据'); |
| | | return |
| | | } |
| | | var obj = { |
| | | metaEntity: this.formInline, |
| | | fileEntities: this.multipleSelection |
| | | }; |
| | | |
| | | const res = await dataUploadInsertFiles(JSON.stringify(obj)); |
| | | if (res.code != 200) { |
| | | this.$message.error('文件上传数据获取失败'); |
| | | return; |
| | | } |
| | | this.getFileLength(); |
| | | |
| | | }, |
| | | |
| | | //显示表格数据 |
| | |
| | | }, |
| | | //文件上传 |
| | | setFileUpload() { |
| | | this.handlerLoading(true); |
| | | var token = getToken(); |
| | | var formData = new FormData(); |
| | | |
| | | var val = document.getElementById("uploadfile").files; |
| | | if (!val || !val.length) return; |
| | | |
| | | for (var i = 0; i < val.length; i++) { |
| | | formData.append(val[i].name, val[i]); |
| | | var fs = document.getElementById("uploadfile"); |
| | | for (var i = 0, c = fs.files.length; i < c; i++) { |
| | | formData.append(fs.files[i].name, fs.files[i]); // fs.files[i].name,file |
| | | } |
| | | formData.append("dirid", this.formInline.dirid); |
| | | formData.append("depid", this.formInline.depid); |
| | | formData.append("verid",this.formInline.verid); |
| | | formData.append("gather", this.formInline.gather); |
| | | formData.append("descr", this.formInline.descr); |
| | | |
| | | $.ajax(BASE_URL+"dataUpload/uploadFiles?token="+token + "&path=" + this.formInline.path, { |
| | | $.ajax(BASE_URL+"/dataUpload/uploadFiles?token="+token + "&path=" + this.formInline.path, { |
| | | type: "post", |
| | | data: formData, |
| | | async: true, |
| | | cache: false, |
| | | processData: false, |
| | | contentType: false, |
| | | success: function (rs) { |
| | | // document.getElementById("file1").value = ""; |
| | | // console.log(rs); |
| | | success:(rs)=> { |
| | | this.getFileLength(); |
| | | |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | |
| | | }, |
| | | error: function (e) { |
| | | // document.getElementById("file1").value = ""; |
| | | // console.error(e); |
| | | error:(rs)=> { |
| | | alert("上传文件失败!"); |
| | | } |
| | | }); |
| | | |
| | | |
| | | // const res = await dataUploadinsertFiles(formData); |
| | | // debugger |
| | | // this.handlerLoading(true); |
| | | // setTimeout(() => { |
| | | // this.handlerLoading(false); |
| | | // }, 2000); |
| | | |
| | | // this.getFileLength(); |
| | | this.handlerLoading(false); |
| | | }, |
| | | |
| | | |
| | | |
| | | //获取文件上传数据 |
| | | getFileLength() { |
| | | async getFileLength() { |
| | | const res = await dataUploadSelectFiles(this.formInline.path); |
| | | if (res.code != 200) { |
| | | this.$message.error('文件上传数据获取失败'); |
| | | return; |
| | | } |
| | | if(res.result == null){ |
| | | this.count =0; |
| | | this.setClearTableData(); |
| | | }else{ |
| | | this.count = res.result.length; |
| | | this.tableData = res.result; |
| | | } |
| | | |
| | | |
| | | // this.listData.pageIndex = 1; |
| | | // this.listData.pageSize = 10; |
| | | // this.setViewTable(); |
| | | }, |
| | | //清除表格信息 |
| | | setClearTableData() { |
| | |
| | | $("#uploadfile").click(); |
| | | }, |
| | | handleFileChange() { |
| | | |
| | | var fs = document.getElementById("uploadfile"); |
| | | |
| | | }, |
| | | //当前时间获取 |
| | |
| | | <el-divider /> |
| | | <div> |
| | | <el-form :inline="true" :model="formInline" class="demo-form-inline"> |
| | | <el-form-item :label="$t('dataManage.vmobj.keyword')"> |
| | | <el-form-item :label="$t('dataManage.dictionaryManageObj.tableName')"> |
| | | <el-input |
| | | v-model="formInline.tab" |
| | | :placeholder="$t('common.pleaseInput')" |
| | |
| | | <div class="dictionaryContent"> |
| | | <div class="dictionary_leftTree"> |
| | | <ul> |
| | | <li @click="getTableDesc(item)" v-for="item in optionCount"> |
| | | <li |
| | | @click="getTableDesc(item)" |
| | | v-for="item in optionCount" |
| | | :class="{ active: activeName == item.tab }" |
| | | > |
| | | {{ item.tabDesc }}({{ item.tab }}) |
| | | </li> |
| | | </ul> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogFormVisible = false">{{ |
| | | <el-button type="info" @click="dialogFormVisible = false">{{ |
| | | $t('dataManage.dictionaryManageObj.cancel') |
| | | }}</el-button> |
| | | <el-button type="primary" @click="updateForm">{{ |
| | | <el-button class="primary" @click="updateForm">{{ |
| | | $t('dataManage.dictionaryManageObj.confirm') |
| | | }}</el-button> |
| | | </div> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="InsertFormdialog = false">{{ |
| | | <el-button type="info" @click="InsertFormdialog = false">{{ |
| | | $t('dataManage.dictionaryManageObj.cancel') |
| | | }}</el-button> |
| | | <el-button type="primary" @click="insertFromData">{{ |
| | | <el-button class="primary" @click="insertFromData">{{ |
| | | $t('dataManage.dictionaryManageObj.confirm') |
| | | }}</el-button> |
| | | </div> |
| | |
| | | components: { MyBread }, |
| | | data() { |
| | | return { |
| | | activeName: '', |
| | | formInline: [], |
| | | listData: { |
| | | ns: '', |
| | |
| | | if (data.code != 200) { |
| | | } |
| | | this.InsertFormdialog = false; |
| | | this.insertform = {}; |
| | | this.startQueryNameData(); |
| | | }, |
| | | |
| | |
| | | getTableDesc(res) { |
| | | this.insertform.tab = res.tab; |
| | | this.insertform.tabDesc = res.tabDesc; |
| | | |
| | | this.insertform.ns = res.ns; |
| | | this.activeName = res.tab; |
| | | this.listData.tab = res.tab; |
| | | this.listData.ns = res.ns; |
| | | this.startQueryNameData(); |
| | |
| | | if (data.code != 200) { |
| | | this.$message.error('下拉调用失败'); |
| | | } |
| | | |
| | | this.optionCount = data.result; |
| | | this.insertform.tab = data.result[0].tab; |
| | | this.insertform.tabDesc = data.result[0].tabDesc; |
| | | this.insertform.ns = data.result[0].ns; |
| | | this.listData.tab = data.result[0].tab; |
| | | this.listData.ns = data.result[0].ns; |
| | | this.activeName = data.result[0].tab; |
| | | this.startQueryNameData(); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | li:hover { |
| | | background: rgba(255, 255, 255, 0.3); |
| | | } |
| | | .active { |
| | | color: #409eff; |
| | | } |
| | | } |
| | | .dictionary_rightContent { |
| | | width: 80%; |
| | |
| | | <div class="right"> |
| | | <div class="inquire"> |
| | | <el-form ref="queryForm" :model="queryForm" :inline="true"> |
| | | <el-form-item :label="$t('dataManage.vmobj.keyword')" prop="name"> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.domCode')" |
| | | prop="name" |
| | | > |
| | | <el-input |
| | | v-model="queryForm.code" |
| | | :placeholder="$t('common.pleaseInput')" |
| | |
| | | <el-dialog |
| | | width="510px" |
| | | top="5vh" |
| | | :title="behavior" |
| | | :title=" |
| | | behavior == '新增用户' |
| | | ? `${$t('common.append')}` |
| | | : `${$t('common.update')}` |
| | | " |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose" |
| | | > |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div v-if="behavior == '修改信息'" slot="footer" class="dialog-footer"> |
| | | <el-button @click="cancelEdit()">重置</el-button> |
| | | <el-button @click="cancelEdit()">{{ $t('common.reset') }}</el-button> |
| | | <el-button |
| | | size="medium" |
| | | type="primary" |
| | | class="primary" |
| | | type="info" |
| | | @click="sendEdit('editForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t('common.confirm') }}</el-button |
| | | > |
| | | </div> |
| | | <div v-else slot="footer" class="dialog-footer"> |
| | | <el-button @click="cancelAdd('editForm')">重置</el-button> |
| | | <el-button type="info" @click="cancelAdd('editForm')">{{ |
| | | $t('common.reset') |
| | | }}</el-button> |
| | | <el-button |
| | | size="medium" |
| | | type="primary" |
| | | class="primary" |
| | | @click="sendAdd('editForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t('common.confirm') }}</el-button |
| | |
| | | sendAdd(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | // console.log(this.editForm); |
| | | this.fullscreenLoading = true; |
| | | insertDomain(this.editForm) |
| | | .then((res) => { |
| | |
| | | }, 500); |
| | | }) |
| | | .catch((res) => { |
| | | alert('修改失败,请重试!'); |
| | | alert('添加失败,请重试!'); |
| | | this.fullscreenLoading = false; |
| | | }); |
| | | } else { |
| | |
| | | > |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-if="btnStatus.insert"> |
| | | <!-- <el-form-item v-if="btnStatus.insert"> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | |
| | | icon="el-icon-plus" |
| | | >{{ $t('common.append') }}</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | <el-form-item v-if="btnStatus.delete"> |
| | | <el-button |
| | | type="danger" |
| | |
| | | >{{ $t('common.delete') }}</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item v-if="btnStatus.download"> |
| | | <!-- <el-form-item v-if="btnStatus.download"> |
| | | <el-button |
| | | @click="downFormData" |
| | | icon="el-icon-download" |
| | |
| | | size="small" |
| | | >{{ $t('common.download') }}</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | </el-form> |
| | | </div> |
| | | <div class="bottom"> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div v-if="behavior == '修改信息'" slot="footer" class="dialog-footer"> |
| | | <el-button size="medium" @click="cancelEdit()">重置</el-button> |
| | | <el-button size="medium" @click="cancelEdit()">{{ |
| | | $t('common.reset') |
| | | }}</el-button> |
| | | <el-button |
| | | size="medium" |
| | | type="primary" |
| | | @click="sendEdit('editForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >提交</el-button |
| | | >{{ $t('common.submit') }}</el-button |
| | | > |
| | | </div> |
| | | <div v-else slot="footer" class="dialog-footer"> |
| | | <el-button size="medium" @click="cancelAdd('editForm')">重置</el-button> |
| | | <el-button size="medium" @click="cancelAdd('editForm')">{{ |
| | | $t('common.reset') |
| | | }}</el-button> |
| | | <el-button |
| | | size="medium" |
| | | type="primary" |
| | | @click="sendAdd('editForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >提交</el-button |
| | | >{{ $t('common.submit') }}</el-button |
| | | > |
| | | </div> |
| | | </el-dialog> |
| | |
| | | .bottom { |
| | | width: 98%; |
| | | margin-top: 1%; |
| | | height: 77%; |
| | | height: 74%; |
| | | padding: 1%; |
| | | border: 1px solid white; |
| | | border-radius: 5px; |
| | |
| | | <el-button |
| | | @click="submitForm('ruleForm')" |
| | | icon="el-icon-search" |
| | | type="primary" |
| | | class="primary" |
| | | size="small" |
| | | >{{ $t('common.iquery') }}</el-button |
| | | > |
| | |
| | | prop="descr" |
| | | :label="$t('dataManage.styleObj.descr')" |
| | | /> |
| | | <!-- <el-table-column |
| | | align="center" |
| | | prop="fileGuid" |
| | | :label="$t('dataManage.styleObj.fileguid')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="viewGuid" |
| | | :label="$t('dataManage.styleObj.viewguid')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="createUser" |
| | | :label="$t('dataManage.styleObj.createUser')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="createTime" |
| | | :label="$t('dataManage.styleObj.createTime')" |
| | | :formatter="formatTime" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="updateUser" |
| | | :label="$t('dataManage.styleObj.updateUser')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="updateTime" |
| | | :label="$t('dataManage.styleObj.updateTime')" |
| | | :formatter="formatTime" |
| | | /> --> |
| | | <el-table-column |
| | | align="center" |
| | | prop="bak" |
| | |
| | | </el-card> |
| | | </div> |
| | | <el-dialog |
| | | title="修改详情" |
| | | :title="$t('dataManage.styleObj.modifyStyleData')" |
| | | top="2vh" |
| | | style="overflow: hidden" |
| | | :before-close="removeUpdate" |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="removeUpdate">{{$t('common.close')}}</el-button> |
| | | <el-button type="primary" @click="updateForm">{{$t('common.confirm')}}</el-button> |
| | | <el-button type="info" @click="removeUpdate">{{$t('common.close')}}</el-button> |
| | | <el-button class="primary" @click="updateForm">{{$t('common.confirm')}}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | |
| | | top="2vh" |
| | | style="overflow: hidden" |
| | | :visible.sync="InsertFormdialog" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form :model="insertform"> |
| | | <el-form-item |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="insertFromDataClose">{{$t('common.close')}}</el-button> |
| | | <el-button type="primary" @click="insertFromData">{{$t('common.confirm')}}</el-button> |
| | | <el-button type="info" @click="insertFromDataClose">{{$t('common.close')}}</el-button> |
| | | <el-button class="primary" @click="insertFromData">{{$t('common.confirm')}}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <div class="leftTree" v-if="showDirCata"> |
| | |
| | | <style-dir-tree></style-dir-tree> |
| | | </div> |
| | | <div class="btnBox"> |
| | | <el-button type="primary" size="small" @click="selectDirCataName">{{ |
| | | <el-button class="primary" size="small" @click="selectDirCataName">{{ |
| | | $t('common.confirm') |
| | | }}</el-button> |
| | | <el-button type="primary" size="small" @click="showDirCata = false">{{ |
| | | <el-button type="info" size="small" @click="showDirCata = false">{{ |
| | | $t('common.close') |
| | | }}</el-button> |
| | | </div> |
| | |
| | | <style-dep-tree></style-dep-tree> |
| | | </div> |
| | | <div class="btnBox"> |
| | | <el-button type="primary" size="small" @click="selectDepCataName">{{ |
| | | <el-button class="primary" size="small" @click="selectDepCataName">{{ |
| | | $t('common.confirm') |
| | | }}</el-button> |
| | | <el-button type="primary" size="small" @click="showDepCata = false">{{ |
| | | <el-button type="info" size="small" @click="showDepCata = false">{{ |
| | | $t('common.close') |
| | | }}</el-button> |
| | | </div> |
| | |
| | | .map((item) => (this.btnStatus[item.tag.substr(1)] = true)); |
| | | }, |
| | | filesReset() { |
| | | document.getElementById("insertFile").reset(); |
| | | document.getElementById("insertimageFile").reset(); |
| | | this.guidFile = null; |
| | | this.fileGuid = null; |
| | | // document.getElementById("insertFile").reset(); |
| | | // document.getElementById("insertimageFile").reset(); |
| | | document.getElementById("insertFile").value = ""; |
| | | document.getElementById("insertimageFile").value = ""; |
| | | |
| | | this.guidFile = ''; |
| | | this.fileGuid = ''; |
| | | }, |
| | | getInsertFile(res) { |
| | | if (res == 0) { |
| | |
| | | }, |
| | | insertFromDataClose() { |
| | | this.InsertFormdialog = false; |
| | | this.insertform = {}; |
| | | this.insertform= { |
| | | fileGuid: null, |
| | | viewGuid: null, |
| | | } |
| | | this.filesReset(); |
| | | }, |
| | | handleClose(){ |
| | | this.InsertFormdialog = false; |
| | | this.insertform= { |
| | | fileGuid: null, |
| | | viewGuid: null, |
| | | } |
| | | this.filesReset(); |
| | | }, |
| | | async insertFromData() { |
| | | if (this.insertform.dirid == null || this.insertform.depid == null) { |
| | |
| | | const data = await insertStyle(this.insertform); |
| | | if (data.code == 200) { |
| | | this.InsertFormdialog = false; |
| | | this.insertform = {}; |
| | | |
| | | this.insertform= { |
| | | fileGuid: null, |
| | | viewGuid: null, |
| | | } |
| | | this.filesReset(); |
| | | this.$message({ |
| | | message: "添加成功!", |
| | |
| | | left: 800px; |
| | | width: 400px; |
| | | height: 600px; |
| | | background: #f0f2f5; |
| | | background: #303030; |
| | | border: 1px solid #000; |
| | | .treeBox { |
| | | height: 550px; |
| | |
| | | } |
| | | .infoBox { |
| | | width: 500px; |
| | | border: 1px solid #eee; |
| | | |
| | | position: absolute; |
| | | z-index: 100; |
| | | top: 15%; |
| | | right: 25%; |
| | | background-color: #fff; |
| | | background-color: #303030; |
| | | .el-card { |
| | | color: white; |
| | | background-color: transparent; |
| | | span { |
| | | font-size: 16px; |
| | |
| | | } |
| | | .contentBox { |
| | | margin: 0 aotu 10px; |
| | | height: 600px; |
| | | height: 500px; |
| | | overflow: auto; |
| | | p { |
| | | // background-color: #bfa; |
| | |
| | | /deep/.el-cascader .el-input__inner { |
| | | border-color: #fff !important; |
| | | } |
| | | |
| | | .primary { |
| | | background: #409eff; |
| | | border: #409eff; |
| | | color: white; |
| | | } |
| | | } |
| | | </style> |
| | | |
| | |
| | | <el-table-column |
| | | align="center" |
| | | prop="name" |
| | | :label="$t('dataManage.vmobj.name')" |
| | | :label="$t('common.versionName')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- <div class="searchComp"> |
| | | <el-form ref="ruleForm" :model="ruleForm" :inline="true"> |
| | | <el-form-item :label="$t('dataManage.vmobj.keyword')" prop="name"> |
| | |
| | | this.insertform.dirid = value; |
| | | }, |
| | | upCatalogChange(val) { |
| | | this.upform.dirid == value; |
| | | this.upform.dirid == val; |
| | | }, |
| | | //目录列表获取 |
| | | async getSelectdirTab() { |
| | |
| | | return; |
| | | } |
| | | this.insertform.path = 1; |
| | | this.insertform.dirid = 1; |
| | | this.catalogOption = this.treeData(res.result); |
| | | }, |
| | | //树列表生成 |
| | |
| | | this.getRoleTabelData(); |
| | | }, |
| | | onSubmit() { |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = 10; |
| | | this.getRoleTabelData(); |
| | | }, |
| | | async getRoleTabelData() { |
| | |
| | | |
| | | this.listData.name = this.ruleForm.name; |
| | | this.listData.depName = this.$store.state.verCateNode.name; |
| | | |
| | | const data = await select_Ver_ByPageAndCount(this.listData); |
| | | |
| | | if (data.code != 200) { |
| | |
| | | // delete this.editForm.checkPass; |
| | | // delete this.editForm.oldPwd; |
| | | // this.editForm.salt = this.editForm.pwd; |
| | | debugger; |
| | | |
| | | updateUser(this.editForm) |
| | | .then((res) => { |
| | | setTimeout(() => { |