glj-代码提交
This commit is contained in:
parent
a2ab80af83
commit
0c7d010c53
|
@ -1,13 +1,12 @@
|
|||
<!--灾害列表table组件-->
|
||||
<template>
|
||||
<div class="search">
|
||||
<el-select class="form-select" size="default" clearable
|
||||
placeholder="Disaster Type" v-model="state.search.disasterType">
|
||||
<el-select class="form-select" size="default" clearable placeholder="Disaster Type"
|
||||
v-model="state.search.disasterType">
|
||||
<el-option v-for="(item, index) in state.dictList" :value="item.dictKey" :key="index" :label="item.dictValue" />
|
||||
</el-select>
|
||||
<el-input type="text"
|
||||
class="form-control" size="default" clearable
|
||||
placeholder="Disaster Country" v-model="state.search.disasterCountry"/>
|
||||
<el-input type="text" class="form-control" size="default" clearable placeholder="Disaster Country"
|
||||
v-model="state.search.disasterCountry" />
|
||||
<el-button size="default" type="primary" class="ml10" @click="getDisasterTable">
|
||||
<el-icon>
|
||||
<ele-Search />
|
||||
|
@ -17,14 +16,13 @@
|
|||
</div>
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="vordmId" label="VoRDM ID" width="118" />
|
||||
<el-table-column prop="dictValue" label="Disaster type" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.disasterData.param.pageNum" background
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange" class="mt15"
|
||||
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.disasterData.param.pageNum" background
|
||||
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.disasterData.total">
|
||||
</el-pagination>
|
||||
|
@ -63,10 +61,12 @@ const state = reactive({
|
|||
},
|
||||
},
|
||||
})
|
||||
|
||||
//灾害表格点击事件
|
||||
const tableClick = (row, column, event) => {
|
||||
emit("click", row.disasterId);
|
||||
emit("childClick", row);
|
||||
}
|
||||
|
||||
//获取字典数据
|
||||
const getDictBizData = () => {
|
||||
getList({ code: 'disaster' }).then(res => {
|
||||
|
@ -77,6 +77,10 @@ const getDictBizData = () => {
|
|||
const getDisasterTable = () => {
|
||||
getPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, state.search).then(res => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item => {
|
||||
let date = item.disasterTime.slice(0, 10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
})
|
||||
}
|
||||
|
@ -108,11 +112,13 @@ defineExpose({
|
|||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.search {
|
||||
display: flex;
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
margin-left: 10px;
|
||||
width: 200px;
|
||||
|
|
|
@ -4,7 +4,7 @@ import qs from 'qs';
|
|||
import { Session } from '/@/utils/storage';
|
||||
|
||||
// export const moduleName = 'zqq-biz-vordm';
|
||||
export const moduleName = 'glj-biz-vordm';
|
||||
export const moduleName = 'biz-vordm';
|
||||
export const crawlModule = 'vordm-crawl';
|
||||
// 配置新建一个 axios 实例
|
||||
const service = axios.create({
|
||||
|
|
|
@ -146,11 +146,10 @@ import { getOtherDataPage, getDisasterPage, deleteData } from '/@/api/data/other
|
|||
import { getList } from '/@/api/disasterInfo/index';
|
||||
import { getList as getNewsList, review } from '/@/api/news/index';
|
||||
import { getDictionary } from '/@/api/system/dictbiz';
|
||||
|
||||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import boot from "./component/boot.vue"
|
||||
import boot from "./component/boot.vue";
|
||||
// 引入组件
|
||||
const auditRef = ref();
|
||||
const bootRef = ref();
|
||||
|
|
|
@ -4,19 +4,7 @@
|
|||
<el-row :gutter="22">
|
||||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column prop="vordmId" label="VoRDM ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.disasterData.param.pageNum" background
|
||||
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.disasterData.total">
|
||||
</el-pagination>
|
||||
<disasterTable @childClick="tableClick"></disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
|
@ -52,7 +40,7 @@
|
|||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="uploaderName" label="Uploader name" width="100" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sourceOrganization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="isPublish" label="isPublish" width="100" show-overflow-tooltip>
|
||||
<el-table-column prop="isPublish" label="isPublish" width="90" show-overflow-tooltip>
|
||||
<template #default=" scope ">
|
||||
<el-tag type="warning" v-if=" scope.row.isPublish == 0 ">NO</el-tag>
|
||||
<el-tag type="success" v-if=" scope.row.isPublish == 1 ">YES</el-tag>
|
||||
|
@ -60,7 +48,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="title" label="Professional title" show-overflow-tooltip
|
||||
width="150"></el-table-column>
|
||||
<el-table-column prop="size" label="Data size" show-overflow-tooltip>
|
||||
<el-table-column prop="size" label="Data size" width="90" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ formatSizeUnits(scope.row.size) }}
|
||||
</template>
|
||||
|
@ -97,6 +85,7 @@ const activeName = ref('first');
|
|||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||
// 引入组件
|
||||
const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialog.vue'));
|
||||
const auditRef = ref();
|
||||
|
@ -163,11 +152,13 @@ const formatSizeUnits = (size) => {
|
|||
|
||||
return (size / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
//灾害表格点击事件
|
||||
const tableClick = (row, column, event) => {
|
||||
state.disasterId = row.disasterId;
|
||||
const tableClick = (i) => {
|
||||
state.disasterId = i.disasterId;
|
||||
getTableData();
|
||||
}
|
||||
|
||||
// 初始化灾害表格数据
|
||||
const getDisasterData = () => {
|
||||
state.disasterData.loading = true;
|
||||
|
|
|
@ -4,19 +4,7 @@
|
|||
<el-row :gutter="22">
|
||||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.disasterData.param.pageNum" background
|
||||
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.disasterData.total">
|
||||
</el-pagination>
|
||||
<disasterTable @childClick="tableClick"></disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
|
@ -73,8 +61,7 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.tableData.param.pageNum" background
|
||||
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum" background
|
||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
|
@ -95,7 +82,7 @@ import EditPicture from './component/editPicture.vue';
|
|||
import { getPicturePage, getDisasterPage, delPicture } from '/@/api/data/pictureInfo.js';
|
||||
import en from 'element-plus/dist/locale/en.mjs';
|
||||
const activeName = ref('first');
|
||||
|
||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
|
@ -177,8 +164,8 @@ const formatSizeUnits = (size) => {
|
|||
return (size / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
||||
};
|
||||
//灾害表格点击事件
|
||||
const tableClick = (row, column, event) => {
|
||||
state.disasterId = row.disasterId;
|
||||
const tableClick = (i) => {
|
||||
state.disasterId = i.disasterId;
|
||||
getTableData();
|
||||
};
|
||||
// 初始化灾害表格数据
|
||||
|
|
|
@ -4,19 +4,7 @@
|
|||
<el-row :gutter="22">
|
||||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.disasterData.param.pageNum" background
|
||||
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.disasterData.total">
|
||||
</el-pagination>
|
||||
<disasterTable @childClick="tableClick"></disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
|
@ -116,6 +104,7 @@ const editWordCloudsRef = ref();
|
|||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||
// 引入组件
|
||||
const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialog.vue'));
|
||||
const auditRef = ref();
|
||||
|
@ -203,8 +192,8 @@ const formatSizeUnits = (size) => {
|
|||
return (size / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
||||
}
|
||||
//灾害表格点击事件
|
||||
const tableClick = (row, column, event) => {
|
||||
state.disasterId = row.disasterId;
|
||||
const tableClick = (i) => {
|
||||
state.disasterId = i.disasterId;
|
||||
getTableData();
|
||||
}
|
||||
// 初始化灾害表格数据
|
||||
|
|
Loading…
Reference in New Issue