| | |
| | | class="demo-form-inline" |
| | | > |
| | | <!-- 单位 --> |
| | | <el-form-item> |
| | | <el-form-item v-if="active == 'first'"> |
| | | <el-select |
| | | size="small" |
| | | v-model="formInline.depid" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 目录 --> |
| | | <el-form-item> |
| | | <el-form-item v-if="active == 'first'"> |
| | | <el-select |
| | | size="small" |
| | | v-model="formInline.dirid" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 版本 --> |
| | | <el-form-item> |
| | | <el-form-item v-if="active == 'first'"> |
| | | <el-select |
| | | size="small" |
| | | v-model="formInline.verid" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 类型 --> |
| | | <el-form-item> |
| | | <el-form-item v-if="active == 'first'"> |
| | | <el-select |
| | | size="small" |
| | | v-model="formInline.type" |
| | |
| | | size="small" |
| | | icon="el-icon-s-promotion" |
| | | >{{$t('common.publish')}}</el-button> |
| | | <!-- 刪除 --> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | @click="setPageDelete" |
| | | >{{$t('common.delete')}}</el-button> |
| | | <!-- 重置 --> |
| | | <el-button |
| | | type="info" |
| | |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | v-if="active == 'first'" |
| | | prop="sizes" |
| | | :label="$t('dataManage.vmobj.size')" |
| | | :formatter="stateFormatSizes" |
| | |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | prop="layer" |
| | | prop="url" |
| | | :label="$t('common.publishAddress')" |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | v-if="active == 'first'" |
| | | prop="uname" |
| | | :label="$t('common.releaseTime')" |
| | | :label="$t('common.rublisher')" |
| | | align="center" |
| | | :key="Math.random()" |
| | | /> |
| | | <el-table-column |
| | | v-if="active != 'first'" |
| | | prop="createName" |
| | | :label="$t('common.rublisher')" |
| | | align="center" |
| | | :key="Math.random()" |
| | | /> |
| | | <el-table-column |
| | | prop="createTime" |
| | | :label="$t('common.rublisher')" |
| | | :formatter="formatData" |
| | | :label="$t('common.releaseTime')" |
| | | align="center" |
| | | /> |
| | | |
| | | <el-table-column |
| | | min-width="150" |
| | | :label="$t('common.operate')" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | v-if="scope.row.layer" |
| | | v-if="scope.row.url" |
| | | size="small" |
| | | type="success" |
| | | plain |
| | | @click="setPreviewLayer(scope.row)" |
| | | >{{$t('common.preview')}} |
| | | |
| | | </el-button> |
| | | <el-button |
| | | v-if="scope.row.url" |
| | | size="small" |
| | | type="warning" |
| | | plain |
| | | @click="setPreviewLayer(scope.row)" |
| | | >{{$t('common.preview')}} |
| | | |
| | | </el-button> |
| | | <el-button |
| | | v-if="scope.row.url" |
| | | size="small" |
| | | type="info" |
| | | plain |
| | | @click="setPreviewLayer(scope.row)" |
| | | >{{$t('common.preview')}} |
| | |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[100, 200, 500, 1000]" |
| | | :page-sizes="showPageSize" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="listData.count" |
| | |
| | | <script> |
| | | import mapview from '../../components/preview_map.vue' |
| | | import MyBread from "../../components/MyBread.vue" |
| | | import { selectdepTab, selectdirTab, meta_selectVerByDirid, publish_selectMetasByPage } from '../../api/api.js' |
| | | import { |
| | | selectdepTab, |
| | | selectdirTab, |
| | | meta_selectVerByDirid, |
| | | publish_selectMetasByPage, |
| | | publish_selectByPage, |
| | | publish_deletes |
| | | } from '../../api/api.js' |
| | | |
| | | export default { |
| | | components: { MyBread, mapview }, |
| | |
| | | }, |
| | | dialogVisible: false, |
| | | showMapView: false, |
| | | showPageSize: [], |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | async setPageDelete() { |
| | | if (this.multipleSelection.length == 0) { |
| | | return this.$message.error("请选择要删除的数据") |
| | | } else { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | const data = await publish_deletes(std); |
| | | if (data.code != 200) { |
| | | this.$message.error("单位列表获取失败") |
| | | return |
| | | } else { |
| | | this.$message({ |
| | | message: '删除成功', |
| | | type: 'success' |
| | | }); |
| | | this.getTableData(); |
| | | } |
| | | } |
| | | |
| | | }, |
| | | //预览弹窗打开 |
| | | setPreviewLayer(res) { |
| | | this.$store.state.previewLayer = res; |
| | | this.dialogVisible = true; |
| | | this.showMapView = true; |
| | | |
| | | }, |
| | | |
| | | //预览弹窗关闭 |
| | | handleClose() { |
| | | this.dialogVisible = false; |
| | | this.showMapView = false; |
| | | |
| | | |
| | | }, |
| | | // 获取多选选中的对象 |
| | |
| | | name: "", |
| | | type: "" |
| | | } |
| | | this.listData = { |
| | | pageIndex: 1, |
| | | pageSize: 100, |
| | | count: 0 |
| | | if (this.active == "first") { |
| | | this.listData = { |
| | | pageIndex: 1, |
| | | pageSize: 100, |
| | | count: 0 |
| | | } |
| | | this.showPageSize = [100, 200, 500, 1000] |
| | | } else { |
| | | this.listData = { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | count: 0 |
| | | } |
| | | this.showPageSize = [10, 20, 50, 100] |
| | | } |
| | | |
| | | this.formInline.type = this.typeOption[0].value; |
| | | this.getDepTreeList(); |
| | | this.getDirTreeList(); |
| | |
| | | }, |
| | | //获取Table表格数据 |
| | | async getTableData() { |
| | | this.listData.depcode = this.formInline.depid; |
| | | this.listData.dircode = this.formInline.dirid; |
| | | this.listData.name = this.formInline.name; |
| | | this.listData.type = this.formInline.type; |
| | | this.listData.verid = this.formInline.verid; |
| | | const data = await publish_selectMetasByPage(this.listData) |
| | | if (data.code != 200) { |
| | | this.tableData = []; |
| | | this.listData.count = 0; |
| | | if (this.active == "first") { |
| | | |
| | | this.listData.depcode = this.formInline.depid; |
| | | this.listData.dircode = this.formInline.dirid; |
| | | this.listData.name = this.formInline.name; |
| | | this.listData.type = this.formInline.type; |
| | | this.listData.verid = this.formInline.verid; |
| | | const data = await publish_selectMetasByPage(this.listData) |
| | | if (data.code != 200) { |
| | | |
| | | } |
| | | if (data.result) { |
| | | |
| | | |
| | | var that = this |
| | | |
| | | var val = data.result.filter((res) => { |
| | | if (res.createTime) { |
| | | res.createTime = that.format(res.createTime); |
| | | } |
| | | |
| | | if (res.url) { |
| | | res.url = res.url.replace("{host}", iisHost); |
| | | } |
| | | return res |
| | | }) |
| | | this.tableData = val; |
| | | this.listData.count = data.count; |
| | | } |
| | | } |
| | | var that = this |
| | | var val = data.result.filter((res) => { |
| | | if (res.createTime) { |
| | | res.createTime = that.format(res.createTime); |
| | | else { |
| | | if (this.formInline.name) { |
| | | this.listData.name = this.formInline.name |
| | | } |
| | | if (res.layer) { |
| | | res.layer = res.layer.replace("{host}", iisHost); |
| | | |
| | | const data = await publish_selectByPage(this.listData); |
| | | debugger |
| | | if (data.result) { |
| | | var that = this |
| | | var val = data.result.filter((res) => { |
| | | if (res.createTime) { |
| | | res.createTime = that.format(res.createTime); |
| | | } |
| | | |
| | | if (res.url) { |
| | | res.url = res.url.replace("{host}", iisHost); |
| | | } |
| | | return res |
| | | }) |
| | | this.tableData = val; |
| | | this.listData.count = data.count; |
| | | } |
| | | return res |
| | | }) |
| | | this.tableData = val; |
| | | this.listData.count = data.count; |
| | | } |
| | | }, |
| | | //格式化时间 |
| | | format(shijianchuo) { |