glj-代码提交

This commit is contained in:
glj 2023-04-26 18:31:19 +08:00
parent d83825035b
commit 448be3757c
7 changed files with 36 additions and 59 deletions

View File

@ -1,8 +1,7 @@
<template>
<div class="layout-footer pb15">
<div class="layout-footer-warp">
<div>vue-next-adminMade by lyt with </div>
<div class="mt5">深圳市 xxx 公司版权所有</div>
</div>
</div>
</template>

View File

@ -3,31 +3,16 @@
<el-config-provider :locale="en">
<el-row :gutter="22">
<el-col :span="10">
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
<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>
<!-- 在disasterType中获取dictKey 对应的dictValue -->
<template #default="scope">
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="disasterKeyword" label="Disaster keywords" show-overflow-tooltip></el-table-column>
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
<el-table-column prop="Operate" label="Operate" width="85" show-overflow-tooltip>
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
<disasterTable @childClick="tableClick">
<el-table-column prop="Operate" label="Operate" width="85" show-overflow-tooltip>
<template #default="scope">
<el-button size="small" text type="primary" @click="startBot(scope.row)">start</el-button>
<!-- <el-tag type="info" v-if="scope.row.respondStatus == 3">complete</el-tag> -->
</template>
</el-table-column>
</el-table>
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
class="mt15" :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>
</div>
</el-col>
<el-col :span="14">
@ -104,10 +89,11 @@
</template>
</el-table-column>
</el-table>
<el-pagination style="margin-left: 20px;" @size-change=" onHandleSizeChange " @current-change=" onHandleCurrentChange " class="mt15"
:page-sizes=" [10, 20, 30] " v-model:current-page=" state.tableData.param.pageNum " background
<el-pagination style="margin-left: 20px;" @size-change=" onHandleSizeChange "
@current-change=" onHandleCurrentChange " class="mt15" :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" >
:total=" state.tableData.total ">
</el-pagination>
</div>
</el-col>
@ -150,6 +136,7 @@ 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 disasterTable from "/@/components/table/DisasterTable.vue";
//
const auditRef = ref();
const bootRef = ref();
@ -250,8 +237,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();
}
//
@ -271,8 +258,8 @@ const getDisasterData = () => {
}
getList(param).then(res => {
state.disasterData.data = res.records;
state.disasterData.data.forEach(item=>{
let date = item.disasterTime.slice(0,10);
state.disasterData.data.forEach(item => {
let date = item.disasterTime.slice(0, 10);
item.disasterTime = date;
})
state.disasterData.total = res.total;
@ -377,11 +364,13 @@ onMounted(() => {
.system-role-container {
.system-role-padding {
padding: 15px;
.el-table {
flex: 1;
}
}
}
.mt15 {
display: flex;
justify-content: end;

View File

@ -19,6 +19,10 @@
<el-input v-model="state.ruleForm.title" class="m-2" placeholder="please enter data title" :rows="3"
type="text" style="width:220px;" />
</el-form-item>
<el-form-item prop="sourceOrganization" label="data organization">
<el-input v-model="state.ruleForm.sourceOrganization" class="m-2" placeholder="please enter data organization " :rows="3"
type="text" style="width:220px;" />
</el-form-item>
<el-form-item prop="type" label="data type">
<el-select v-model="state.ruleForm.type" class="m-2" placeholder="please select data type">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
@ -27,7 +31,7 @@
<el-form-item prop="visualFlag" label="data visualFlag">
<el-select v-model="state.ruleForm.visualFlag" placeholder="please select data visualFlag" size="default" >
<el-option label="Visualization" value= 1></el-option>
<el-option label="B Visualization" value= 0></el-option>
<el-option label="Not Visualization" value= 0></el-option>
</el-select>
</el-form-item>
<el-form-item prop="remark" label="data details">
@ -154,6 +158,7 @@ const onSubmit = () => {
state.dataForm.append('disasterId', state.disasterId);
state.dataForm.append('visualFlag', state.ruleForm.visualFlag);
state.dataForm.append('title', state.ruleForm.title);
state.dataForm.append('sourceOrganization', state.ruleForm.sourceOrganization);
for (let [a, b] of state.dataForm.entries()) {
console.log(a, b, '--------------');
}

View File

@ -46,7 +46,7 @@
<el-tag type="success" v-if="scope.row.isPublish == 1">YES</el-tag>
</template>
</el-table-column>
<el-table-column prop="title" label="Professional title" show-overflow-tooltip
<el-table-column prop="title" label="Title" show-overflow-tooltip
width="150"></el-table-column>
<el-table-column prop="size" label="Data size" width="90" show-overflow-tooltip>
<template #default="scope">
@ -252,6 +252,10 @@ const pub = (row) => {
name:row.title
}
pushing(da).then(data => {
console.log(data,"datadatadatadata");
if(data.code == 1500){
ElMessage.error(data.msg);
}
let daNew = {
id: row.id,
isPublish: 1

View File

@ -3,25 +3,15 @@
<el-row :gutter="22">
<el-col :span="10">
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 80vh;">
<span style="margin:2%;font-weight: 600;font-size: 18px;">Disaster Info</span>
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
highlight-current-row @row-click="tableClick">
<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-column prop="Operate" label="Operate" width="85" show-overflow-tooltip>
<disasterTable @childClick="tableClick">
<el-table-column prop="Operate" label="Operate" width="85" show-overflow-tooltip>
<template #default="scope">
<el-button size="small" text type="primary" @click="startBot(scope.row)">start</el-button>
<!-- <el-tag type="info" v-if="scope.row.respondStatus == 3">complete</el-tag> -->
</template>
</el-table-column>
</el-table>
<el-pagination style="margin-right:20px;" @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
class="mt15" :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>
</div>
</el-col>
<el-col :span="14">
@ -154,6 +144,8 @@
import { ref, reactive, onMounted } from 'vue';
import { getRemoteSensingSourceData, getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
import { getDisasterPage } from '/@/api/data/otherData.js'
import disasterTable from "/@/components/table/DisasterTable.vue";
// import { getList as getDisasterPage } from '/@/api/disasterInfo/index';
const state = reactive({
@ -239,8 +231,8 @@ const getDisasterData = () => {
}
//
const tableClick = (row) => {
state.disasterId = row.disasterId;
const tableClick = (i) => {
state.disasterId = i.disasterId;
getData()
}

View File

@ -1,17 +1,5 @@
<template>
<div class="container">
<!-- <el-tabs v-model="state.activeName">
<el-tab-pane label="Search condition"
name="first">
<search-condition></search-condition>
</el-tab-pane>
<el-tab-pane label="Retrieval condition"
name="second">
<retrieval-condition></retrieval-condition>
</el-tab-pane>
</el-tabs> -->
<search-condition v-if ="state.isEdit" ref="edit" @response="responseFn"></search-condition>
<retrieval-condition v-if ="!state.isEdit" @response="responseFn"></retrieval-condition>
</div>