| | |
| | | size="small" |
| | | >重置</el-button |
| | | > |
| | | <el-button |
| | | <!-- <el-button |
| | | @click="downFormData" |
| | | icon="el-icon-download" |
| | | type="success" |
| | | size="small" |
| | | >下载</el-button |
| | | > |
| | | > --> |
| | | <!-- <el-button |
| | | @click="downFormData" |
| | | icon="el-icon-download" |
| | |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column min-width="150" prop="name" label="数据名称" /> |
| | | <el-table-column prop="dirid" label="目录ID" /> |
| | | <el-table-column prop="depid" label="单位ID" /> |
| | | <el-table-column prop="verid" label="版本ID" /> |
| | | <el-table-column prop="type" label="格式" /> |
| | | <el-table-column prop="sizes" label="大小:单位MB" /> |
| | | <el-table-column prop="cs" label="坐标系" /> |
| | | <el-table-column prop="scale" label="比例尺" /> |
| | | <el-table-column prop="resolution" label="分辨率" /> |
| | | <el-table-column |
| | | prop="gather" |
| | | label="采集日期" |
| | | :formatter="formatTime" |
| | | min-width="100" |
| | | prop="createUser" |
| | | label="创建人员" |
| | | /> |
| | | <el-table-column prop="descr" label="描述" /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="createTime" |
| | | label="创建时间" |
| | | /> |
| | | <el-table-column min-width="100" prop="cs" label="坐标系统" /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="scale" |
| | | label="比例尺/分辨率" |
| | | /> |
| | | <el-table-column min-width="100" prop="format" label="存储格式" /> |
| | | <el-table-column min-width="100" prop="version" label="数据版本" /> |
| | | <el-table-column prop="status" label="发布" width="70%"> |
| | | <template slot-scope="scope"> |
| | | <span |
| | | slot="reference" |
| | | v-if="scope.row.s_url === '' || scope.row.s_url === null" |
| | | > |
| | | <i class="dotClass" style="background-color: gray"></i> |
| | | </span> |
| | | <span slot="reference" v-else> |
| | | <i class="dotClass" style="background-color: springgreen"></i> |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column min-width="100" label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-link @click="showDetail(scope.$index, scope.row)" |
| | |
| | | style="margin-left: 10px" |
| | | >发布</el-link |
| | | > |
| | | <!-- <el-link |
| | | <el-link |
| | | v-else |
| | | @click="handleStop(scope.row)" |
| | | style="margin-left: 10px" |
| | | >停止</el-link |
| | | > --> |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :current-page="currentPage" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :page-size="listData.pageSize" |
| | | :page-size="10" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="count" |
| | | > |
| | |
| | | <div class="contentBox"> |
| | | <p>数据名称:{{ itemdetail.name }}</p> |
| | | <el-divider></el-divider> |
| | | <p>目录ID:{{ itemdetail.dirid }}</p> |
| | | <p> |
| | | 数据范围: |
| | | {{ itemdetail.x_min }}, {{ itemdetail.y_min }}; |
| | | {{ itemdetail.x_max }}, {{ itemdetail.y_max }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>单位ID:{{ itemdetail.depid }}</p> |
| | | <p>创建时间:{{ itemdetail.create_time }}</p> |
| | | <el-divider></el-divider> |
| | | <p>版本ID:{{ itemdetail.verid }}</p> |
| | | <p>创建人员:{{ itemdetail.create_user }}</p> |
| | | <el-divider></el-divider> |
| | | <p>格式:{{ itemdetail.type }}</p> |
| | | <p>更新时间:{{ itemdetail.up_time }}</p> |
| | | <el-divider></el-divider> |
| | | <p>大小(单位MB):{{ itemdetail.sizes }}</p> |
| | | <p>更新人员:{{ itemdetail.up_user }}</p> |
| | | <el-divider></el-divider> |
| | | <p>坐标系:{{ itemdetail.cs }}</p> |
| | | <p>上传单位:{{ itemdetail.up_unit }}</p> |
| | | <el-divider></el-divider> |
| | | <p>比例尺:{{ itemdetail.scale }}</p> |
| | | <p>数据状态:{{ itemdetail.status }}</p> |
| | | <el-divider></el-divider> |
| | | <p>分辨率:{{ itemdetail.resolution }}</p> |
| | | <p>坐标系统:{{ itemdetail.coor_sys }}</p> |
| | | <el-divider></el-divider> |
| | | <p>采集日期:{{ itemdetail.gather }}</p> |
| | | <p>比例尺/分辨率:{{ itemdetail.accuracy }}</p> |
| | | <el-divider></el-divider> |
| | | <p>描述:{{ itemdetail.descr }}</p> |
| | | <p> |
| | | 发布地址:{{ itemdetail.s_url }} |
| | | <el-link |
| | | @click="ShowWindowFly(itemdetail.s_url)" |
| | | :underline="false" |
| | | type="primary" |
| | | >详情</el-link |
| | | > |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>创建人ID:{{ itemdetail.createUser }}</p> |
| | | <p>数据版本:{{ itemdetail.version }}</p> |
| | | <el-divider></el-divider> |
| | | <p>创建时间:{{ itemdetail.createTime }}</p> |
| | | <p>数据类型:{{ itemdetail.type }}</p> |
| | | <el-divider></el-divider> |
| | | <p>更新人ID:{{ itemdetail.updateUser }}</p> |
| | | <el-divider></el-divider> |
| | | <p>更新时间:{{ itemdetail.updateTime }}</p> |
| | | <el-divider></el-divider> |
| | | <p>数据格式:{{ itemdetail.format }}</p> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | |
| | | <el-form-item label="数据名称" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.name" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="目录ID" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.dirid" autocomplete="off"></el-input> |
| | | <el-form-item label="数据范围x_min" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.x_min" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="单位ID" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.depid" autocomplete="off"></el-input> |
| | | <el-form-item label="数据范围x_max" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.x_max" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="版本ID" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.verid" autocomplete="off"></el-input> |
| | | <el-form-item label="数据范围y_min" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.y_min" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="格式" :label-width="formLabelWidth"> |
| | | <el-form-item label="数据范围y_max" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.y_max" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="创建时间" :label-width="formLabelWidth"> |
| | | <el-date-picker |
| | | v-model="upform.create_time" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | style="width: 100%" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="坐标系统" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.coor_sys" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="比例尺/分辨率" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.accuracy" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="数据格式" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.format" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="数据版本" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.version" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="数据类型" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.type" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="大小(单位MB)" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.sizes" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="坐标系" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.cs" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="比例尺" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.scale" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="分辨率" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.resolution" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="采集日期" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.gather" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="描述" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.descr" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | <script> |
| | | import { |
| | | select_meta_ByPageAndCount, |
| | | queryDataCount, |
| | | updateMeta, |
| | | deleteMeta, |
| | | // queryDataCount, |
| | | updateMetaData, |
| | | dltMetaDatas, |
| | | publishMeta, |
| | | unpublishMeta, |
| | | } from '../../api/api'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import moment from 'moment'; |
| | | } from "../../api/api"; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | export default { |
| | | name: 'metadataManage', |
| | | name: "metadataManage", |
| | | components: { MyBread }, |
| | | data() { |
| | | var repasswordValidator = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('请再次输入密码')); |
| | | if (value === "") { |
| | | callback(new Error("请再次输入密码")); |
| | | } else if (value !== this.codeForm.password) { |
| | | callback(new Error('两次输入密码不一致!')); |
| | | callback(new Error("两次输入密码不一致!")); |
| | | } else { |
| | | callback(); |
| | | } |
| | |
| | | showCodeBox: false, |
| | | value: true, |
| | | multipleSelection: [], |
| | | formLabelWidth: '120px', |
| | | formLabelWidth: "120px", |
| | | dialogFormVisible: false, |
| | | InsertFormdialog: false, |
| | | insertform: {}, |
| | |
| | | showinfoBox: false, |
| | | itemdetail: {}, |
| | | ruleForm: { |
| | | name: '', |
| | | name: "", |
| | | }, |
| | | codeForm: { |
| | | password: '', |
| | | repassword: '', |
| | | password: "", |
| | | repassword: "", |
| | | }, |
| | | rules: { |
| | | password: [{ required: true, message: '请输入密码', trigger: 'blur' }], |
| | | password: [{ required: true, message: "请输入密码", trigger: "blur" }], |
| | | repassword: [ |
| | | { required: true, message: '请输入确认密码', trigger: 'blur' }, |
| | | { validator: repasswordValidator, trigger: 'blur' }, |
| | | { required: true, message: "请输入确认密码", trigger: "blur" }, |
| | | { validator: repasswordValidator, trigger: "blur" }, |
| | | ], |
| | | }, |
| | | tableData: [], |
| | | count: 0, |
| | | |
| | | searchName: '', |
| | | listData: { |
| | | name: null, |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | }, |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | pageNum: 1, |
| | | searchName: "", |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getMetaData(); |
| | | this.getMetaData(10, 1, ""); |
| | | }, |
| | | methods: { |
| | | formatTime(row, column) { |
| | | let date = row[column.property]; |
| | | if (date === undefined || date === null) { |
| | | return ''; |
| | | } |
| | | return moment(parseInt(date)).format('YYYY-MM-DD HH:mm:ss'); |
| | | }, |
| | | ShowWindowFly(res) { |
| | | if (res == '') return; |
| | | if (res.indexOf('.xls') != -1) { |
| | | console.log(res); |
| | | if (res == "") return; |
| | | if (res.indexOf(".xls") != -1) { |
| | | this.showMetadata(res, true); |
| | | } else if (res.indexOf('.doc') != -1) { |
| | | } else if (res.indexOf(".doc") != -1) { |
| | | this.showMetadata(res, true); |
| | | } else if (res.indexOf('.png') != -1) { |
| | | } else if (res.indexOf(".png") != -1) { |
| | | this.showMetadata(res, true); |
| | | } else if (res.indexOf('.jpg') != -1) { |
| | | } else if (res.indexOf(".jpg") != -1) { |
| | | this.showMetadata(res, true); |
| | | } else if (res.indexOf('.pdf') != -1) { |
| | | } else if (res.indexOf(".pdf") != -1) { |
| | | this.showMetadata(res, true); |
| | | } else if (res.indexOf('.fly') != -1) { |
| | | } else if (res.indexOf(".fly") != -1) { |
| | | this.showMetadata(res, false); |
| | | } else if (res.indexOf('.mpt') != -1) { |
| | | } else if (res.indexOf(".mpt") != -1) { |
| | | this.showMetadata(res, false); |
| | | } |
| | | }, |
| | |
| | | if (flag == true) { |
| | | metaUrl = res; |
| | | } else if (flag == false) { |
| | | metaUrl = ifreamUrl + '/LFWeb/MetaPop.html?name=' + res; |
| | | metaUrl = ifreamUrl + "/LFWeb/MetaPop.html?name=" + res; |
| | | } |
| | | window.open( |
| | | metaUrl, |
| | | '', |
| | | 'height=800, width=1500, top=150, left=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no' |
| | | "", |
| | | "height=800, width=1500, top=150, left=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no" |
| | | ); |
| | | }, |
| | | // 请求数据内容 |
| | | async getMetaData() { |
| | | if (this.listData.tab == '') { |
| | | delete this.listData.tab; |
| | | } |
| | | this.listData.name = this.ruleForm.name; |
| | | const data = await select_meta_ByPageAndCount(this.listData); |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | } |
| | | console.log(data); |
| | | this.tableData = data.result; |
| | | this.count = data.count; |
| | | }, |
| | | // 请求数据数量 |
| | | getMetaCount(name) { |
| | | queryDataCount(name).then((res) => { |
| | | this.count = res.data; |
| | | getMetaData(size, num, name) { |
| | | let params = { |
| | | name: name, |
| | | pageIndex: num, |
| | | pageSize: size, |
| | | }; |
| | | select_meta_ByPageAndCount(params).then((res) => { |
| | | // console.log(res); |
| | | this.tableData = res.result; |
| | | this.count = res.count; |
| | | }); |
| | | }, |
| | | |
| | | // 关键字查询 |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.getMetaData(); |
| | | this.searchName = this.ruleForm.name.trim(); |
| | | this.getMetaData(10, 1, this.searchName); |
| | | } else { |
| | | console.log('error submit!!'); |
| | | console.log("error submit!!"); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // 重置查询 |
| | | resetForm(formName) { |
| | | this.getMetaData(10, 1, ""); |
| | | this.searchName = ""; |
| | | this.$refs[formName].resetFields(); |
| | | this.getMetaData(); |
| | | }, |
| | | // 获取多选选中的对象 |
| | | handleSelectionChange(val) { |
| | |
| | | this.upform = JSON.parse(JSON.stringify(row)); |
| | | }, |
| | | // 提交修改 |
| | | async updateForm() { |
| | | this.dialogFormVisible = false; |
| | | const data = await updateMeta(this.upform); |
| | | if (data.code == 200) { |
| | | this.dialogFormVisible = false; |
| | | this.upform = {}; |
| | | this.$message({ |
| | | message: '修改成功!', |
| | | type: 'success', |
| | | }); |
| | | this.getMetaData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '修改失败!', |
| | | type: 'warning', |
| | | }); |
| | | } |
| | | updateForm() { |
| | | this.$confirm("是否确定编辑?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.dialogFormVisible = false; |
| | | updateMetaData(this.upform).then((res) => { |
| | | if (res.data == 1) { |
| | | this.$message({ |
| | | message: "修改成功", |
| | | type: "success", |
| | | }); |
| | | } |
| | | this.getMetaData(10, 1, ""); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | |
| | | // 删除多条 |
| | | async DelFormData() { |
| | | DelFormData() { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | const data = await deleteMeta({ ids: std.toString() }); |
| | | if (data.code == 200) { |
| | | this.$message({ |
| | | message: '删除成功!', |
| | | type: 'success', |
| | | }); |
| | | this.getMetaData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '删除失败!', |
| | | type: 'warning', |
| | | }); |
| | | } |
| | | this.$confirm("确定是否删除所选内容?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | dltMetaDatas(std).then((res) => { |
| | | this.getMetaData(10, 1, ""); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | download(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | let ids = ''; |
| | | let ids = ""; |
| | | this.multipleSelection.forEach((e) => { |
| | | ids += `id=${e.id}&`; |
| | | }); |
| | | let res = ids.substring(0, ids.length - 1); |
| | | // console.log(res); |
| | | let url = 'http://192.168.20.106/LFServer/Meta/Downloads?' + res; |
| | | let url = "http://192.168.20.106/LFServer/Meta/Downloads?" + res; |
| | | window.open(url); |
| | | this.closeDown(); |
| | | } else { |
| | | console.log('下载失败'); |
| | | console.log("下载失败"); |
| | | this.closeDown(); |
| | | return false; |
| | | } |
| | |
| | | }, |
| | | closeDown() { |
| | | this.showCodeBox = false; |
| | | this.codeForm.password = ''; |
| | | this.codeForm.repassword = ''; |
| | | this.codeForm.password = ""; |
| | | this.codeForm.repassword = ""; |
| | | }, |
| | | downFormData() { |
| | | // var std = []; |
| | |
| | | // std.push(this.multipleSelection[i].id); |
| | | // } |
| | | if (this.multipleSelection.length == 0) { |
| | | alert('请先选择要下载的文件'); |
| | | alert("请先选择要下载的文件"); |
| | | return; |
| | | } |
| | | this.showCodeBox = true; |
| | |
| | | // .catch(() => {}); |
| | | }, |
| | | handleStart(row) { |
| | | publishMeta(row.id).then((res) => { |
| | | console.log(res); |
| | | this.getMetaData(10, 1, ''); |
| | | this.getMetaCount(''); |
| | | }); |
| | | // publishMeta(row.id).then((res) => { |
| | | // console.log(res); |
| | | // this.getMetaData(10, 1, ""); |
| | | // }); |
| | | }, |
| | | handleStop(row) { |
| | | console.log(row.id); |
| | | unpublishMeta(row.id).then((res) => { |
| | | console.log(res); |
| | | this.getMetaData(10, 1, ''); |
| | | this.getMetaCount(''); |
| | | }); |
| | | // unpublishMeta(row.id).then((res) => { |
| | | // console.log(res); |
| | | // this.getMetaData(10, 1, ""); |
| | | // }); |
| | | }, |
| | | // 条数修改 |
| | | handleSizeChange(val) { |
| | | this.listData.pageSize = val; |
| | | this.getMetaData(); |
| | | this.pageSize = val; |
| | | this.getMetaData(this.pageSize, 1, this.searchName); |
| | | }, |
| | | // 页数修改 |
| | | handleCurrentChange(val) { |
| | | this.listData.pageIndex = val; |
| | | this.getMetaData(); |
| | | this.pageNum = val; |
| | | this.getMetaData(this.pageSize, this.pageNum, this.searchName); |
| | | }, |
| | | }, |
| | | }; |