完成批量上传
This commit is contained in:
parent
d3e0002975
commit
3bee267219
|
|
@ -11092,6 +11092,11 @@
|
|||
"resolved": "https://registry.npmmirror.com/js-cookie/-/js-cookie-2.2.1.tgz",
|
||||
"integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ=="
|
||||
},
|
||||
"js-md5": {
|
||||
"version": "0.8.3",
|
||||
"resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.8.3.tgz",
|
||||
"integrity": "sha512-qR0HB5uP6wCuRMrWPTrkMaev7MJZwJuuw4fnwAzRgP4J4/F8RwtodOKpGp4XpqsLBFzzgqIO42efFAyz2Et6KQ=="
|
||||
},
|
||||
"js-pinyin": {
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmmirror.com/js-pinyin/-/js-pinyin-0.1.9.tgz",
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
"echarts-gl": "^1.1.0",
|
||||
"element-ui": "^2.13.0",
|
||||
"js-cookie": "^2.2.0",
|
||||
"js-md5": "^0.8.3",
|
||||
"js-pinyin": "^0.1.9",
|
||||
"leaflet": "^1.9.4",
|
||||
"leaflet.wmts": "^1.0.2",
|
||||
|
|
|
|||
|
|
@ -71,3 +71,12 @@ export function sampleStationList(query) {
|
|||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取航次详情
|
||||
export function regInfo(query) {
|
||||
return request({
|
||||
url: '/voyage/reg/info.htm',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,3 +204,33 @@ export function trackMap(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 上传轨迹文件
|
||||
export function uploadTrack(data) {
|
||||
return request({
|
||||
url: '/sample/dataset/track/upload.htm',
|
||||
method: 'post',
|
||||
type: 'multipart/form-data',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量导入下潜轨迹
|
||||
export function uploadDiving(data) {
|
||||
return request({
|
||||
url: '/sample/diving/upload.htm',
|
||||
method: 'post',
|
||||
type: 'multipart/form-data',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量导入样品
|
||||
export function uploadDataset(data) {
|
||||
return request({
|
||||
url: '/sample/dataset/upload.htm',
|
||||
method: 'post',
|
||||
type: 'multipart/form-data',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,17 @@ export function login(data) {
|
|||
// 退出登录
|
||||
export function loginOut(data) {
|
||||
return request({
|
||||
url: '/frame/optr/logout.htm ',
|
||||
url: '/frame/optr/logout.htm',
|
||||
method: 'post',
|
||||
type: 'application/x-www-form-urlencoded',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化登录信息
|
||||
export function initInfo(data) {
|
||||
return request({
|
||||
url: '/frame/optr/init.htm',
|
||||
method: 'post',
|
||||
type: 'application/x-www-form-urlencoded',
|
||||
data
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<el-dropdown trigger="click">
|
||||
<el-dropdown>
|
||||
<span class="el-dropdown-link userClass">
|
||||
<a href="javascript:void(0);">admin<img src="../../../static/images/arrow-down.png" alt=""></a>
|
||||
</span>
|
||||
|
|
@ -24,60 +24,30 @@
|
|||
<el-dropdown-item>
|
||||
<a href="javascript:void(0);" @click="routerTurn('personalCenter')">个人中心</a>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<a href="javascript:void(0);" @click="onLogout">退出登录</a>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-dropdown trigger="click">
|
||||
<span class="el-dropdown-link userClass">
|
||||
<a href="javascript:void(0);" @click="routerTurn('login')">登录</a>
|
||||
</span>
|
||||
</el-dropdown>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="menu2" >
|
||||
<i class="el-icon-menu" @click="handleMenu"></i>
|
||||
</div>
|
||||
<div>
|
||||
<el-tooltip class="tooltip" effect="dark" content="登录" placement="bottom">
|
||||
<el-button type="primary" icon="el-icon-user" circle @click="onLogin"></el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 登录弹窗-->
|
||||
<el-dialog title="用户登录" :visible.sync="open" :before-close="cancel" width="500px" append-to-body>
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules">
|
||||
<el-form-item prop="loginName">
|
||||
<el-input
|
||||
v-model="loginForm.loginName"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder="请输入登录名称"
|
||||
prefix-icon="el-icon-user"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="loginPass">
|
||||
<el-input
|
||||
v-model="loginForm.loginPass"
|
||||
type="loginPass"
|
||||
auto-complete="off"
|
||||
placeholder="请输入登录密码"
|
||||
prefix-icon="el-icon-lock"
|
||||
@keyup.enter.native="handleLogin"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleLogin">登 录</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
logoutCas
|
||||
} from '@/utils/logoutCas' // get token from cookie
|
||||
import {
|
||||
removeToken
|
||||
} from '@/utils/auth'
|
||||
import { login } from '@/api/login' // get token from cookie
|
||||
import { initInfo, loginOut } from '@/api/login'
|
||||
|
||||
export default {
|
||||
name: 'headers',
|
||||
props: {
|
||||
|
|
@ -86,7 +56,6 @@ export default {
|
|||
data(){
|
||||
return {
|
||||
collapse:true,
|
||||
loginStatuss: '',
|
||||
menu:[
|
||||
{
|
||||
name:"首页",
|
||||
|
|
@ -218,24 +187,11 @@ export default {
|
|||
|
||||
],
|
||||
nowPathName: '',
|
||||
navShow:false,
|
||||
open: false,
|
||||
loginForm: {
|
||||
loginName: '',
|
||||
loginPass: '',
|
||||
loginCode: '1234'
|
||||
},
|
||||
loginRules: {
|
||||
loginName: [
|
||||
{ required: true, trigger: "blur", message: "请输入登录名称" }
|
||||
],
|
||||
loginPass: [
|
||||
{ required: true, trigger: "blur", message: "请输入登录密码" }
|
||||
],
|
||||
},
|
||||
navShow:false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getLoginInfo()
|
||||
},
|
||||
mounted(){
|
||||
$('.dropdown').hover(
|
||||
|
|
@ -276,34 +232,21 @@ export default {
|
|||
this.collapse=true
|
||||
}
|
||||
},
|
||||
// 登录
|
||||
onLogin() {
|
||||
this.open = true
|
||||
// 退出登录
|
||||
onLogout() {
|
||||
loginOut().then(res => {
|
||||
this.$router.push({
|
||||
path: 'login'
|
||||
})
|
||||
this.getLoginInfo()
|
||||
})
|
||||
},
|
||||
// 提交表单
|
||||
handleLogin() {
|
||||
this.$refs['loginForm'].validate(valid => {
|
||||
if (valid) {
|
||||
login(this.loginForm).then(res => {
|
||||
// 获取登录信息
|
||||
getLoginInfo() {
|
||||
initInfo().then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 关闭弹窗
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
loginName: '',
|
||||
loginPass: '',
|
||||
loginCode: '1234'
|
||||
}
|
||||
this.$refs['form'].resetFields()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
import Layout from '@/layout'
|
||||
import store from '../store'
|
||||
import {
|
||||
getParameterValue
|
||||
} from '@/utils/auth' // get token from cookie
|
||||
import {
|
||||
setToken, getToken, setUser, setUserID, getUserID
|
||||
} from '@/utils/auth' // get token from cookie
|
||||
import {
|
||||
getByUname
|
||||
} from '@/api/getByUname'
|
||||
// import store from '../store'
|
||||
// import {
|
||||
// getParameterValue
|
||||
// } from '@/utils/auth' // get token from cookie
|
||||
// import {
|
||||
// setToken, getToken, setUser, setUserID, getUserID
|
||||
// } from '@/utils/auth' // get token from cookie
|
||||
// import {
|
||||
// getByUname
|
||||
// } from '@/api/getByUname'
|
||||
Vue.use(Router)
|
||||
const originalPush = Router.prototype.push
|
||||
|
||||
|
|
@ -456,19 +456,19 @@ const router = createRouter()
|
|||
|
||||
router.beforeEach((to, from, next) => {
|
||||
to.meta.title && (document.title = to.meta.title + ' | Deep-sea')
|
||||
const jsid = getParameterValue('jsessionid')
|
||||
const cu = getParameterValue('cu')
|
||||
const userID = getParameterValue('userId')
|
||||
// const jsid = getParameterValue('jsessionid')
|
||||
// const cu = getParameterValue('cu')
|
||||
// const userID = getParameterValue('userId')
|
||||
// 如果url上用户名 cu userId到本地
|
||||
if (!!jsid && !!cu) {
|
||||
setToken(jsid)
|
||||
setUser(cu)
|
||||
setUserID(userID)
|
||||
window.sessionStorage.setItem('cu', cu)
|
||||
}
|
||||
window.sessionStorage.setItem('userID', getUserID())
|
||||
store.dispatch('app/setUser')
|
||||
const hasToken = getToken()
|
||||
// if (!!jsid && !!cu) {
|
||||
// setToken(jsid)
|
||||
// setUser(cu)
|
||||
// setUserID(userID)
|
||||
// window.sessionStorage.setItem('cu', cu)
|
||||
// }
|
||||
// window.sessionStorage.setItem('userID', getUserID())
|
||||
// store.dispatch('app/setUser')
|
||||
// const hasToken = getToken()
|
||||
// 个人空间和后台系统需要登录 loginAuthority为true就是可以免登陆
|
||||
// if (!to.meta.loginAuthority) {
|
||||
// window.sessionStorage.setItem('sign', 'asos_service')
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ const sample = {
|
|||
// 当前数据样品集数据
|
||||
datasetRow: new Object(),
|
||||
// 当前数据样品集ID
|
||||
datasetId: null
|
||||
datasetId: null,
|
||||
// 轨迹文件名称
|
||||
trackName: ''
|
||||
},
|
||||
mutations: {
|
||||
SET_FORM_DATA: (state, data) => {
|
||||
|
|
@ -24,6 +26,9 @@ const sample = {
|
|||
},
|
||||
SET_ID: (state, id) => {
|
||||
state.datasetId = id
|
||||
},
|
||||
SET_TRACK_NAME: (state, trackName) => {
|
||||
state.trackName = trackName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,7 +196,6 @@ color:#0ba1e4;
|
|||
.checkBtn{
|
||||
float:right;
|
||||
text-align: right;
|
||||
|
||||
}
|
||||
.topic1{
|
||||
padding:0px 16px;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import axios from 'axios'
|
||||
|
||||
axios.defaults.withCredentials = true
|
||||
import {
|
||||
Message
|
||||
} from 'element-ui'
|
||||
|
|
@ -47,6 +47,20 @@ service.interceptors.request.use(
|
|||
service.interceptors.response.use(
|
||||
response => {
|
||||
const res = response.data
|
||||
if (res.errorCode === 10301) {
|
||||
// 当前未登录或已经过期
|
||||
Message({
|
||||
message: res.errorMsg,
|
||||
type: 'warning'
|
||||
})
|
||||
} else if (res.errorCode === 0) {
|
||||
return res
|
||||
} else {
|
||||
Message({
|
||||
message: '系统错误',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
// if the custom code is not 20000, it is judged as an error.
|
||||
// if (res && res.code && res.code !== 20000) {
|
||||
// if (res.code === 20001 || res.code === 401) {
|
||||
|
|
@ -62,7 +76,7 @@ service.interceptors.response.use(
|
|||
// }
|
||||
// }
|
||||
// }
|
||||
return res
|
||||
// return res
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error) // for debug
|
||||
|
|
|
|||
|
|
@ -10,102 +10,76 @@
|
|||
<el-breadcrumb-item
|
||||
:to="{ name: 'dataSearch' }"
|
||||
>数据检索</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>数据样品信息详情</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>航次详细信息</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div>
|
||||
<div class="detail_a">
|
||||
<div class="">
|
||||
<div style="width: 100%;">
|
||||
<div class="detail_b">
|
||||
<h3>{{ obj.name }}</h3>
|
||||
<p class="tit_a">
|
||||
数据样品信息简述:数据样品SY510-TXS-YS-01为2021年第23个航次,第1次载人潜器下潜中采集到的若干珊瑚礁石样品,样品数据包含原始数据、后处理数据、成果数据。
|
||||
数据样品SY510-TXS-YS-01为2021年第23个航次,第1次载人潜器下潜中采集到的若干珊瑚礁石样品,样品数据包含原始数据、后处理数据、成果数据。
|
||||
|
||||
</p>
|
||||
<h4>
|
||||
数据样品元数据信息:
|
||||
</h4>
|
||||
<h3>{{ info.voyage_name }}</h3>
|
||||
<p class="tit_a">{{ info.voyage_remark }}</p>
|
||||
<h4>航次信息:</h4>
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<label>航次:</label><span>TS-14 </span>
|
||||
<label>科考船舶:</label><span>{{ info.ship_name }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<label>平台:</label><span>着陆器</span>
|
||||
<label>资助机构:</label><span>{{ info.funding_org }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<label>设备:</label><span>机械手</span>
|
||||
<label>离港日期:</label><span>{{ info.voyage_start_date }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<label>机械手:</label><span>岩石</span>
|
||||
<label>返港日期:</label><span>{{ info.voyage_end_date }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<label>航次首席:</label><span>MERY</span>
|
||||
<label>航次首席:</label><span>{{ info.voyage_officer }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zhuti">
|
||||
<div class="left">
|
||||
<div class="left1" :class="show ? 'active' : ''">
|
||||
<img v-if="!show" src="../../static/images/arrow.png" alt="">
|
||||
<div
|
||||
class="left1"
|
||||
v-for="(item,index) in listTab"
|
||||
:key="index"
|
||||
:class="currentTab == item.label ? 'active' : ''"
|
||||
@click="selectTab(item)"
|
||||
>
|
||||
<img v-if="currentTab == item.label" src="../../static/images/arrow.png" alt="">
|
||||
<img v-else src="../../static/images/arrow_a.png" alt="">
|
||||
<p>数据文件</p>
|
||||
</div>
|
||||
<div class="left1" :class="show1 ? 'active' : ''">
|
||||
<img v-if="!show1" src="../../static/images/arrow.png" alt="">
|
||||
<img v-else src="../../static/images/arrow_a.png" alt="">
|
||||
<p>文档报告</p>
|
||||
</div>
|
||||
<div class="left1" :class="show2 ? 'active' : ''">
|
||||
<img v-if="!show2" src="../../static/images/arrow.png" alt="">
|
||||
<img v-else src="../../static/images/arrow_a.png" alt="">
|
||||
<p>数据来源信息</p>
|
||||
</div>
|
||||
<div class="left1" :class="show2 ? 'active' : ''">
|
||||
<img v-if="!show2" src="../../static/images/arrow.png" alt="">
|
||||
<img v-else src="../../static/images/arrow_a.png" alt="">
|
||||
<p>数据引用信息</p>
|
||||
</div>
|
||||
<div class="left1" :class="show2 ? 'active' : ''">
|
||||
<img v-if="!show2" src="../../static/images/arrow.png" alt="">
|
||||
<img v-else src="../../static/images/arrow_a.png" alt="">
|
||||
<p>XML元数据文件</p>
|
||||
<p>{{ item.label }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<el-row type="flex" justify="space-between">
|
||||
<el-col :span="20">
|
||||
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">全选</el-checkbox>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" @click="download">下载所选文件</el-button>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin: 15px 0;" />
|
||||
<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
|
||||
|
||||
<el-checkbox v-for="item in cities" :key="item.name" :label="item.name">
|
||||
<div>
|
||||
<span>{{ item.name }}</span>
|
||||
<div class="data_s">
|
||||
<label for="">Size:</label><span>{{ item.size }}</span>
|
||||
<label for="">Format:</label><span>{{ item.format }}</span>
|
||||
|
||||
<a href="http://120.48.105.88:8081/dataDetails/296c1ff351224b3d8a4b856592c0fb67" target="_blank">详情</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-checkbox>
|
||||
|
||||
</el-checkbox-group>
|
||||
<!-- 数据样品类型-->
|
||||
<el-table v-if="currentTab == '数据样品类型'" stripe :data="datasetArray" :header-cell-style="{ background: '#dddfe6',color: '#555960',textAlign: 'center' }" :cell-style="{ textAlign: 'center' }">
|
||||
<el-table-column prop="dataset_name" label="数据集名称"/>
|
||||
<el-table-column prop="platform_type" label="平台类型" />
|
||||
<el-table-column prop="equipment_type" label="设备类型" />
|
||||
<el-table-column prop="data_type" label="数据样品类型" />
|
||||
<el-table-column prop="job_type" label="作业类型" />
|
||||
</el-table>
|
||||
<!-- 设备类型-->
|
||||
<el-table v-if="currentTab == '设备类型'" stripe :data="equipmentArray" :header-cell-style="{ background: '#dddfe6',color: '#555960',textAlign: 'center' }" :cell-style="{ textAlign: 'center' }">
|
||||
<el-table-column prop="equipment_type" label="设备类型" />
|
||||
<el-table-column prop="equipment_alias" label="简称" />
|
||||
<el-table-column prop="equipment_total" label="频次" />
|
||||
</el-table>
|
||||
<!-- 参航人员-->
|
||||
<el-table v-if="currentTab == '参航人员'" stripe :data="memberArray" :header-cell-style="{ background: '#dddfe6',color: '#555960',textAlign: 'center' }" :cell-style="{ textAlign: 'center' }">
|
||||
<el-table-column prop="member_name" label="参航人员" />
|
||||
<el-table-column prop="member_unit" label="单位" />
|
||||
<el-table-column prop="member_birthday" label="出生日期" />
|
||||
<el-table-column prop="member_dept" label="岗位" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -117,12 +91,12 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div>
|
||||
|
||||
</div> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { regInfo } from '@/api/dataSearch'
|
||||
|
||||
export default {
|
||||
name: 'DataDetail',
|
||||
components: {
|
||||
|
|
@ -130,54 +104,48 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
checkAll: false,
|
||||
checkedCities: [],
|
||||
cities: [
|
||||
title: 'SY510-TXS-YS-01',
|
||||
listTab: [
|
||||
{
|
||||
name: 'SY510-TXS-YS-01_clip1.grd',
|
||||
size: '12',
|
||||
format: 'NetCDF'
|
||||
label: '数据样品类型',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
name: 'SY510-TXS-YS-01_clip2.grd',
|
||||
size: '12',
|
||||
format: 'NetCDF'
|
||||
},
|
||||
{
|
||||
name: 'SY510-TXS-YS-01_clip3.grd',
|
||||
size: '12',
|
||||
format: 'NetCDF'
|
||||
},
|
||||
{
|
||||
name: 'SY510-TXS-YS-01_clip4.grd',
|
||||
size: '12',
|
||||
format: 'NetCDF'
|
||||
label: '设备类型',
|
||||
value: '1'
|
||||
},{
|
||||
label: '参航人员',
|
||||
value: '1'
|
||||
}
|
||||
],
|
||||
isIndeterminate: true,
|
||||
obj: {
|
||||
name: '数据样品SY510-TXS-YS-01'
|
||||
},
|
||||
show: false,
|
||||
show1: true,
|
||||
show2: false
|
||||
|
||||
currentTab: '数据样品类型',
|
||||
voyageName: '',
|
||||
// 航次信息
|
||||
info: {},
|
||||
datasetArray: [],
|
||||
equipmentArray: [],
|
||||
memberArray: [],
|
||||
platformArray: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.voyageName = this.$route.query.voyage_name
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
download() {
|
||||
//
|
||||
selectTab(item) {
|
||||
this.currentTab = item.label
|
||||
},
|
||||
handleCheckAllChange(val) {
|
||||
debugger
|
||||
const data = this.cities.map(item => item.name)
|
||||
this.checkedCities = val ? data : []
|
||||
this.isIndeterminate = false
|
||||
},
|
||||
handleCheckedCitiesChange(value) {
|
||||
const checkedCount = value.length
|
||||
this.checkAll = checkedCount === this.cities.length
|
||||
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length
|
||||
// 获取航次详情
|
||||
getInfo() {
|
||||
regInfo({voyage_name: this.voyageName}).then(res => {
|
||||
console.log(res)
|
||||
this.info = res.map.voyage
|
||||
this.datasetArray = res.map.DatasetArray
|
||||
this.equipmentArray = res.map.EquipmentArray
|
||||
this.memberArray = res.map.MemberArray
|
||||
this.platformArray = res.map.PlatformArray
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -589,8 +589,13 @@ export default {
|
|||
autoZoom(){
|
||||
this.viewer.zoomTo(this.viewer.entities)
|
||||
},
|
||||
turnDeatilPage() {
|
||||
this.$router.push({ name: 'dataDetail' })
|
||||
turnDeatilPage(item) {
|
||||
this.$router.push({
|
||||
name: 'dataDetail',
|
||||
query: {
|
||||
voyage_name: item.voyage_name
|
||||
}
|
||||
})
|
||||
},
|
||||
shousuo() {
|
||||
this.show = true
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div id="" class="page-body">
|
||||
<div class="page-body">
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">数据样品信息汇交</h1>
|
||||
<el-breadcrumb>
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="filter-container">
|
||||
<div class="checkBtn">
|
||||
<div class="checkBtn flex">
|
||||
<el-button
|
||||
v-for="item in btnList"
|
||||
:key="item.value"
|
||||
|
|
@ -17,6 +17,28 @@
|
|||
size="medium"
|
||||
@click="handleBtn(item)"
|
||||
>{{ item.label }}</el-button>
|
||||
<el-upload
|
||||
class="upload-btn"
|
||||
ref="upload"
|
||||
action="action"
|
||||
:multiple="false"
|
||||
:show-file-list="false"
|
||||
:http-request="uploadDataset"
|
||||
:before-upload="beforeUploadDataset"
|
||||
>
|
||||
<el-button :loading="loadingDataset">批量导入样品</el-button>
|
||||
</el-upload>
|
||||
<el-upload
|
||||
class="upload-btn"
|
||||
ref="upload"
|
||||
action="action"
|
||||
:multiple="false"
|
||||
:show-file-list="false"
|
||||
:http-request="uploadDiving"
|
||||
:before-upload="beforeUploadDiving"
|
||||
>
|
||||
<el-button :loading="loadingDiving">批量导入下潜轨迹</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
</div>
|
||||
<!--新增数据集-->
|
||||
|
|
@ -37,6 +59,7 @@ import AddData from '@/views/dataTransfer/sampleViews/AddData'
|
|||
import DataList from '@/views/dataTransfer/sampleViews/DataList'
|
||||
import LineList from '@/views/dataTransfer/sampleViews/LineList'
|
||||
import StationList from '@/views/dataTransfer/sampleViews/StationList'
|
||||
import { uploadDataset, uploadDiving } from '@/api/dataTransfer'
|
||||
export default {
|
||||
name: 'SampleDataset',
|
||||
components: { AddData, DataList, LineList, StationList },
|
||||
|
|
@ -58,19 +81,13 @@ export default {
|
|||
{
|
||||
label: '站位数据样品汇交',
|
||||
value: 'station'
|
||||
},
|
||||
{
|
||||
label: '批量导入样品',
|
||||
value: 'sample'
|
||||
},
|
||||
{
|
||||
label: '批量导入下潜轨迹',
|
||||
value: 'track'
|
||||
}
|
||||
],
|
||||
currentValue: 'add',
|
||||
row: {},
|
||||
id: null
|
||||
currentValue: 'list',
|
||||
loadingDataset: false,
|
||||
textDataset: '批量导入样品',
|
||||
loadingDiving: false,
|
||||
textDiving: '批量导入样品'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -103,8 +120,59 @@ export default {
|
|||
}
|
||||
this.$store.commit('SET_ROW', row)
|
||||
this.$store.commit('SET_ID', row.tsy_id)
|
||||
},
|
||||
beforeUploadDataset(file) { // 上传文件之前钩子
|
||||
const type = file.name.split('.')[1]
|
||||
if (type !== 'xlsx') {
|
||||
this.$message({ type: 'error', message: '只支持xlsx文件格式!' })
|
||||
return false
|
||||
}
|
||||
},
|
||||
uploadDataset(param) {
|
||||
this.loadingDataset = true
|
||||
this.textDataset = '数据处理中'
|
||||
const formData = new FormData()
|
||||
formData.append('file', param.file)
|
||||
uploadDataset(formData).then(res => {
|
||||
if (res.errorCode === 0) {
|
||||
this.loadingDataset = false
|
||||
this.textDataset = '批量导入样品'
|
||||
this.$message.success('导入成功!')
|
||||
this.currentValue = 'list'
|
||||
}
|
||||
})
|
||||
},
|
||||
beforeUploadDiving(file) { // 上传文件之前钩子
|
||||
const type = file.name.split('.')[1]
|
||||
if (type !== 'txt') {
|
||||
this.$message({ type: 'error', message: '只支持txt文件格式!' })
|
||||
return false
|
||||
}
|
||||
},
|
||||
uploadDiving(param) {
|
||||
this.loadingDiving = true
|
||||
this.textDiving = '数据处理中'
|
||||
const formData = new FormData()
|
||||
formData.append('file', param.file)
|
||||
uploadDiving(formData).then(res => {
|
||||
if (res.errorCode === 0) {
|
||||
this.loadingDiving = false
|
||||
this.textDiving = '批量导入下潜轨迹'
|
||||
this.$message.success('导入成功!')
|
||||
this.currentValue = 'list'
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.flex {
|
||||
display: flex;
|
||||
.upload-btn {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
<template>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DiveTrack'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
|
@ -2,7 +2,16 @@
|
|||
<div>
|
||||
<div class="bar">
|
||||
<span class="track-name">潜次 [{{ diving_sn }}]</span>
|
||||
<el-button type="primary">上传轨迹文件</el-button>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
action="action"
|
||||
:multiple="false"
|
||||
:show-file-list="false"
|
||||
:http-request="uploadBpmn"
|
||||
:before-upload="beforeUpload"
|
||||
>
|
||||
<el-button :loading="loading" type="primary">{{ btnText }}</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" size="small" label-width="200px">
|
||||
<el-row>
|
||||
|
|
@ -61,7 +70,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { trackMap } from '@/api/dataTransfer'
|
||||
import { trackMap, uploadTrack } from '@/api/dataTransfer'
|
||||
|
||||
export default {
|
||||
name: 'TrackInfo',
|
||||
|
|
@ -79,7 +88,9 @@ export default {
|
|||
track_lon: '',
|
||||
track_lat: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
loading: false,
|
||||
btnText: '上传轨迹文件'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -93,7 +104,7 @@ export default {
|
|||
return this.$store.state.sample.datasetRow.diving_sn
|
||||
},
|
||||
diving_track_file() {
|
||||
return this.$store.state.sample.datasetRow.diving_track_file
|
||||
return this.$store.state.sample.trackName || this.$store.state.sample.datasetRow.diving_track_file
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -107,6 +118,32 @@ export default {
|
|||
this.form = map
|
||||
}
|
||||
})
|
||||
},
|
||||
beforeUpload(file) { // 上传文件之前钩子
|
||||
const type = file.name.split('.')[1]
|
||||
if (type !== 'txt') {
|
||||
this.$message({ type: 'error', message: '只支持txt文件格式!' })
|
||||
return false
|
||||
}
|
||||
},
|
||||
uploadBpmn(param) {
|
||||
this.loading = true
|
||||
this.btnText = '数据处理中'
|
||||
const formData = new FormData()
|
||||
formData.append('file', param.file)
|
||||
formData.append('dataset_id', this.id)
|
||||
uploadTrack(formData).then(res => {
|
||||
if (res.errorCode === 0) {
|
||||
this.loading = false
|
||||
this.btnText = '上传轨迹文件'
|
||||
this.$message.success('上传成功!')
|
||||
this.$store.commit('SET_TRACK_NAME', res.entity)
|
||||
this.getTrackInfo()
|
||||
}
|
||||
}).cache(() => {
|
||||
this.loading = false
|
||||
this.btnText = '上传轨迹文件'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,26 +17,26 @@
|
|||
<div class="shuru">
|
||||
<div class="shuru1">
|
||||
<img src="../../static/images/yonghu.png" alt="">
|
||||
<input v-model="name" type="text" placeholder="请输入用户名">
|
||||
<input v-model="loginName" type="text" placeholder="请输入用户名">
|
||||
</div>
|
||||
<div class="shuru1">
|
||||
<img src="../../static/images/mima.png" alt="">
|
||||
<input v-model="password" type="text" placeholder="请输入面膜">
|
||||
</div>
|
||||
<div class="shuru2">
|
||||
<img class="tt" src="../../static/images/tucode.png" alt="">
|
||||
<input v-model="code" type="text" placeholder="请输入验证码">
|
||||
<img class="tt2" src="../../static/images/tucode1.png" alt="">
|
||||
<input v-model="loginPass" type="password" placeholder="请输入密码">
|
||||
</div>
|
||||
<!-- <div class="shuru2">-->
|
||||
<!-- <img class="tt" src="../../static/images/tucode.png" alt="">-->
|
||||
<!-- <input v-model="loginCode" type="text" placeholder="请输入验证码">-->
|
||||
<!-- <img class="tt2" src="../../static/images/tucode1.png" alt="">-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="denglu">
|
||||
<el-button>重置</el-button>
|
||||
<el-button type="primary" @click="denglu">登录</el-button>
|
||||
</div>
|
||||
<div class="dibu">
|
||||
<p>没有账号?</p>
|
||||
<span>立即注册</span>
|
||||
<el-button @click="onReset">重置</el-button>
|
||||
<el-button type="primary" @click="onLogin">登录</el-button>
|
||||
</div>
|
||||
<!-- <div class="dibu">-->
|
||||
<!-- <p>没有账号?</p>-->
|
||||
<!-- <span>立即注册</span>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -44,20 +44,38 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { login } from '@/api/login'
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
data() {
|
||||
return {
|
||||
name: '',
|
||||
password: '',
|
||||
code: ''
|
||||
loginName: '',
|
||||
loginPass: '',
|
||||
loginCode: '1234'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
denglu() {
|
||||
this.$router.push({
|
||||
name: 'index'
|
||||
onLogin() {
|
||||
if (!this.loginName) return this.$message.warning('请输入用户名')
|
||||
if (!this.loginPass) return this.$message.warning('请输入密码')
|
||||
const psd = this.loginPass
|
||||
login({
|
||||
loginName: this.loginName,
|
||||
loginPass: md5(psd),
|
||||
loginCode: this.loginCode
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$router.back()
|
||||
} else {
|
||||
this.$message.error(res.errorMsg)
|
||||
}
|
||||
})
|
||||
},
|
||||
onReset() {
|
||||
this.loginName = ''
|
||||
this.loginPass = ''
|
||||
this.loginCode = '1234'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -91,7 +109,7 @@ export default {
|
|||
}
|
||||
.login {
|
||||
width: 540px;
|
||||
height: 640px;
|
||||
//height: 640px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
|
|
|
|||
|
|
@ -428,7 +428,7 @@ export default {
|
|||
},
|
||||
init() {
|
||||
this.currentPage = 1
|
||||
this.getData()
|
||||
// this.getData()
|
||||
},
|
||||
async getData() {
|
||||
if (this.search.voyageName.length && !validateSpecialChart(this.search.voyageName)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue