|
@@ -15,24 +15,57 @@
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="dataDownList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table v-loading="loading" :data="dataDownList" border @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="指令" align="center" prop="order" />
|
|
|
- <el-table-column label="下载的数据名称" align="center" prop="name" />
|
|
|
- <el-table-column label="保存路径" align="center" prop="path" />
|
|
|
- <el-table-column label="备注" align="center" prop="remark" />
|
|
|
+ <el-table-column label="批次" align="center" prop="batch" />
|
|
|
+ <el-table-column label="机型" align="center" prop="airType" />
|
|
|
+ <el-table-column label="机号" align="center" prop="airNumber" />
|
|
|
+ <el-table-column label="架次号" align="center" prop="sortie" />
|
|
|
+ <el-table-column label="下载状态" align="center" prop="downloadStatus" />
|
|
|
+ <el-table-column label="下载方式" align="center" prop="downloadMethod" />
|
|
|
+ <el-table-column label="解析状态" align="center" prop="analysisStatus" />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)"
|
|
|
+ v-hasPermi="['manage:deepIsolationModel:edit']">详情</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
|
@pagination="getList" />
|
|
|
|
|
|
<!-- 数据下载对话框 -->
|
|
|
- <dataDownDialog :open="open" :cancel='cancel' :getList='getList'/>
|
|
|
+ <!-- <dataDownDialog :open="open" :cancel='cancel' :getList='getList' /> -->
|
|
|
+ <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="500px" append-to-body>
|
|
|
+ <el-form ref="form" :model="onlineForm" :rules="rules" label-width="100px">
|
|
|
+ <el-form-item prop="dataSource">
|
|
|
+ <template>
|
|
|
+ <el-radio v-model="onlineForm.dataSource" label="1">机载phm</el-radio>
|
|
|
+ <el-radio v-model="onlineForm.dataSource" label="2">数链仿真</el-radio>
|
|
|
+ </template>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="架次信息" prop="sortie">
|
|
|
+ <el-select v-model="onlineForm.order" placeholder="请选择架次" style="width:100%">
|
|
|
+ <el-option v-for="item in sortieList" :key="item.id" :label="item.sortieNumber"
|
|
|
+ :value="item.id">
|
|
|
+ <span style="float: left">{{ item.sortieNumber }}</span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">{{ item.aircraftNumber }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitForm" :loading="butLoading">{{ butText }}</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<!-- 离线下载对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="openOffline" :close-on-click-modal="false" width="600px" append-to-body>
|
|
|
+ <el-dialog :title="title" :visible.sync="openOffline" :close-on-click-modal="false" width="600px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
<el-form-item label="文件" prop="caseFileName">
|
|
|
- <file-upload ref="fileUpload" :fileType="['xls','xlsx']" :fileSize = "0" v-model="form.caseFileName" :limit="1"></file-upload>
|
|
|
+ <file-upload ref="fileUpload" :fileType="['xls','xlsx']" :fileSize="0" v-model="form.caseFileName"
|
|
|
+ :limit="1"></file-upload>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -50,13 +83,14 @@ import {
|
|
|
delDataDown,
|
|
|
addDataDown,
|
|
|
updateDataDown,
|
|
|
-} from "@/api/manage/dataDown";
|
|
|
-import { listInstructionInfo } from "@/api/manage/instructionInfo";
|
|
|
+} from '@/api/manage/dataDown'
|
|
|
+import { listInstructionInfo } from '@/api/manage/instructionInfo'
|
|
|
import dataDownDialog from '@/views/manage/dataDown/dataDownDialog'
|
|
|
+import { listSortie } from '@/api/manage/sortie'
|
|
|
|
|
|
export default {
|
|
|
- name: "DataDown",
|
|
|
- components:{ dataDownDialog },
|
|
|
+ name: 'DataDown',
|
|
|
+ components: { dataDownDialog },
|
|
|
data() {
|
|
|
return {
|
|
|
index: 1,
|
|
@@ -65,7 +99,7 @@ export default {
|
|
|
// 按钮加载
|
|
|
butLoading: false,
|
|
|
// 按钮显示文本
|
|
|
- butText: "点击下载",
|
|
|
+ butText: '点击下载',
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
// 非单个禁用
|
|
@@ -79,7 +113,7 @@ export default {
|
|
|
// 数据下载表格数据
|
|
|
dataDownList: [],
|
|
|
// 弹出层标题
|
|
|
- title: "",
|
|
|
+ title: '',
|
|
|
// 指令西信息
|
|
|
instructionInfoList: [],
|
|
|
// 是否显示弹出层
|
|
@@ -88,30 +122,35 @@ export default {
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- order: null,
|
|
|
- name: null,
|
|
|
- path: null,
|
|
|
- remark: null,
|
|
|
- type: null,
|
|
|
- createBy: null,
|
|
|
- createTime: null,
|
|
|
- updateBy: null,
|
|
|
- updateTime: null,
|
|
|
+ batch: null,
|
|
|
+ airType: null,
|
|
|
+ airNumber: null,
|
|
|
+ sortie: null,
|
|
|
+ downloadStatus: null,
|
|
|
+ downloadMethod: null,
|
|
|
+ analysisStatus: null,
|
|
|
},
|
|
|
- // 表单参数
|
|
|
+ // 离线下载表单参数
|
|
|
form: {
|
|
|
- type: ".xlsx",
|
|
|
- path: "/phm/uploadPath",
|
|
|
+ type: '.xlsx',
|
|
|
+ path: '/phm/uploadPath',
|
|
|
+ },
|
|
|
+ // 在线下载表单参数
|
|
|
+ onlineForm: {
|
|
|
+ dataSource:'1',
|
|
|
},
|
|
|
// 表单校验
|
|
|
rules: {},
|
|
|
//打开离线下载对话框
|
|
|
- openOffline:false
|
|
|
- };
|
|
|
+ openOffline: false,
|
|
|
+ // 架次信息
|
|
|
+ sortieList:[]
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
- this.getList();
|
|
|
- this.getListInstructionInfo();
|
|
|
+ this.getList()
|
|
|
+ this.getSortieList()
|
|
|
+ this.getListInstructionInfo()
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取指令
|
|
@@ -123,126 +162,146 @@ export default {
|
|
|
content: null,
|
|
|
}
|
|
|
listInstructionInfo(queryParams).then(response => {
|
|
|
- this.instructionInfoList = response.rows;
|
|
|
- });
|
|
|
+ this.instructionInfoList = response.rows
|
|
|
+ console.log("this.instructionInfoList",this.instructionInfoList);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 架次信息列表
|
|
|
+ getSortieList() {
|
|
|
+ this.loading = true
|
|
|
+ const query={
|
|
|
+ pageNum: 1
|
|
|
+ }
|
|
|
+ listSortie(query).then(response => {
|
|
|
+ this.sortieList = response.rows
|
|
|
+ console.log("sortieList",this.sortieList);
|
|
|
+ this.total = response.total
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
/** 查询数据下载列表 */
|
|
|
getList() {
|
|
|
- this.loading = true;
|
|
|
- // listDataDown(this.queryParams).then(response => {
|
|
|
- // this.dataDownList = response.rows;
|
|
|
- // this.total = response.total;
|
|
|
- // this.loading = false;
|
|
|
- // });
|
|
|
- this.dataDownList = JSON.parse(localStorage.getItem("data-down")) || [];
|
|
|
- this.total = this.dataDownList?.length || 0;
|
|
|
- this.loading = false;
|
|
|
+ this.loading = true
|
|
|
+ listDataDown(this.queryParams).then(response => {
|
|
|
+ this.dataDownList = response.rows;
|
|
|
+ console.log("dataDownList",this.dataDownList);
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ // this.dataDownList = JSON.parse(localStorage.getItem('data-down')) || []
|
|
|
+ // this.total = this.dataDownList?.length || 0
|
|
|
+ // this.loading = false
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
- this.open = false;
|
|
|
- this.openOffline = false;
|
|
|
- this.reset();
|
|
|
+ this.open = false
|
|
|
+ this.openOffline = false
|
|
|
+ this.reset()
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
|
order: null,
|
|
|
- remark: null
|
|
|
+ remark: null,
|
|
|
}
|
|
|
- this.resetForm("form");
|
|
|
+ this.resetForm('form')
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
+ this.getList()
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.handleQuery();
|
|
|
+ this.resetForm('queryForm')
|
|
|
+ this.handleQuery()
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map((item) => item.id);
|
|
|
- this.single = selection.length !== 1;
|
|
|
- this.multiple = !selection.length;
|
|
|
+ this.ids = selection.map(item => item.id)
|
|
|
+ this.single = selection.length !== 1
|
|
|
+ this.multiple = !selection.length
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
- this.reset();
|
|
|
- this.open = true;
|
|
|
- this.title = "下载指令信息确定";
|
|
|
+ this.reset()
|
|
|
+ this.open = true
|
|
|
+ this.title = '数据在线下载'
|
|
|
},
|
|
|
// 打开离线下载框
|
|
|
- offlineDownload(){
|
|
|
- this.openOffline=true;
|
|
|
- this.title = "数据离线下载";
|
|
|
+ offlineDownload() {
|
|
|
+ this.openOffline = true
|
|
|
+ this.title = '数据离线下载'
|
|
|
+ },
|
|
|
+ // 详情
|
|
|
+ handleDetail(row) {
|
|
|
+ console.log(row)
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
- this.reset();
|
|
|
- const id = row.id || this.ids;
|
|
|
- getDataDown(id).then((response) => {
|
|
|
- this.form = response.data;
|
|
|
- this.open = true;
|
|
|
- this.title = "修改数据下载";
|
|
|
- });
|
|
|
+ this.reset()
|
|
|
+ const id = row.id || this.ids
|
|
|
+ getDataDown(id).then(response => {
|
|
|
+ this.form = response.data
|
|
|
+ this.open = true
|
|
|
+ this.title = '修改数据下载'
|
|
|
+ })
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.butLoading = true;
|
|
|
- this.butText = "下载中";
|
|
|
+ this.butLoading = true
|
|
|
+ this.butText = '下载中'
|
|
|
setTimeout(() => {
|
|
|
// 方法区
|
|
|
- if (this.form.order === "error") {
|
|
|
- this.$modal.msgError("下载异常");
|
|
|
- this.butLoading = false;
|
|
|
- this.butText = "点击下载";
|
|
|
- return;
|
|
|
+ if (this.form.order === 'error') {
|
|
|
+ this.$modal.msgError('下载异常')
|
|
|
+ this.butLoading = false
|
|
|
+ this.butText = '点击下载'
|
|
|
+ return
|
|
|
}
|
|
|
// 服务获取文件
|
|
|
let dataObj = {
|
|
|
order: this.form.order,
|
|
|
name: `固定格式_${new Date().getTime()}.xlsx`,
|
|
|
- path: "/phm/uploadPath",
|
|
|
+ path: '/phm/uploadPath',
|
|
|
remark: this.form.remark,
|
|
|
- };
|
|
|
- let data = JSON.parse(localStorage.getItem("data-down")) || [];
|
|
|
- data.push(dataObj);
|
|
|
- localStorage.setItem("data-down", JSON.stringify(data));
|
|
|
- this.getList();
|
|
|
+ }
|
|
|
+ let data = JSON.parse(localStorage.getItem('data-down')) || []
|
|
|
+ data.push(dataObj)
|
|
|
+ localStorage.setItem('data-down', JSON.stringify(data))
|
|
|
+ // this.open?
|
|
|
+ this.getList()
|
|
|
// 保存指定路径
|
|
|
- this.butLoading = false;
|
|
|
- this.butText = "点击下载";
|
|
|
- this.$modal.msgSuccess("下载成功");
|
|
|
- this.open = false;
|
|
|
- }, 1000);
|
|
|
+ this.butLoading = false
|
|
|
+ this.butText = '点击下载'
|
|
|
+ this.$modal.msgSuccess('下载成功')
|
|
|
+ this.cancel()
|
|
|
+ }, 1000)
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const ids = row.id || this.ids;
|
|
|
+ const ids = row.id || this.ids
|
|
|
this.$modal
|
|
|
.confirm('是否确认删除数据下载编号为"' + ids + '"的数据项?')
|
|
|
.then(function () {
|
|
|
- return delDataDown(ids);
|
|
|
+ return delDataDown(ids)
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.getList();
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
+ this.getList()
|
|
|
+ this.$modal.msgSuccess('删除成功')
|
|
|
})
|
|
|
- .catch(() => { });
|
|
|
+ .catch(() => {})
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
this.download(
|
|
|
- "manage/dataDown/export",
|
|
|
+ 'manage/dataDown/export',
|
|
|
{
|
|
|
...this.queryParams,
|
|
|
},
|
|
|
`dataDown_${new Date().getTime()}.xlsx`
|
|
|
- );
|
|
|
+ )
|
|
|
},
|
|
|
},
|
|
|
-};
|
|
|
+}
|
|
|
</script>
|