|
@@ -8,7 +8,21 @@
|
|
|
-->
|
|
|
<template>
|
|
|
<div class="airportInfo">
|
|
|
- <DataTable tableHeight="700" :data-id="dataId" :rows="12" labelWidth="100px" :min-height="70" width="800px" is-statuser show-overflow-tooltip with-column-set with-preview @handleAdd="handleAdd" @handleEdit="handleEdit" @preview="handlePreview">
|
|
|
+ <DataTable
|
|
|
+ tableHeight="700"
|
|
|
+ :data-id="dataId"
|
|
|
+ :rows="12"
|
|
|
+ labelWidth="100px"
|
|
|
+ :min-height="70"
|
|
|
+ width="800px"
|
|
|
+ is-statuser
|
|
|
+ show-overflow-tooltip
|
|
|
+ with-column-set
|
|
|
+ with-preview
|
|
|
+ @handleAdd="handleAdd"
|
|
|
+ @handleEdit="handleEdit"
|
|
|
+ @preview="handlePreview"
|
|
|
+ >
|
|
|
<template v-slot:header>
|
|
|
<div class="status flex-wrap">
|
|
|
<div class="manageTitle">查询模板</div>
|
|
@@ -69,8 +83,19 @@
|
|
|
?
|
|
|
</div>
|
|
|
<div class="DelFoot right t30">
|
|
|
- <el-button size="medium" class="r25 buwitch" type="danger" @click="remove()">删除</el-button>
|
|
|
- <el-button size="medium" class="r26" @click="flag = false">取消</el-button>
|
|
|
+ <el-button
|
|
|
+ size="medium"
|
|
|
+ class="r25 buwitch"
|
|
|
+ type="danger"
|
|
|
+ @click="remove()"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="medium"
|
|
|
+ class="r26"
|
|
|
+ @click="flag = false"
|
|
|
+ >取消</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</Dialog>
|
|
@@ -78,31 +103,31 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
// import Search from '@/layout/components/Search/index.vue'
|
|
|
-import Dialog from "@/layout/components/Dialog/index.vue";
|
|
|
-import { findarrays } from "@/utils/validate";
|
|
|
+import Dialog from '@/layout/components/Dialog/index.vue'
|
|
|
+import { findarrays } from '@/utils/validate'
|
|
|
// import { AirlinesInquiry } from '@/api/SystemSettings'
|
|
|
import {
|
|
|
exceptiontype,
|
|
|
- exceptionadd,
|
|
|
+ exceptionadd
|
|
|
// exceptiondel
|
|
|
-} from "@/api/acquisition";
|
|
|
-import { GeneralDataReception, Query } from "@/api/dataIntegration";
|
|
|
-import DataTable from "@/components/Table";
|
|
|
+} from '@/api/acquisition'
|
|
|
+import { GeneralDataReception, Query } from '@/api/dataIntegration'
|
|
|
+import DataTable from '@/components/Table'
|
|
|
export default {
|
|
|
- name: "AirportInfo",
|
|
|
+ name: 'AirportInfo',
|
|
|
components: {
|
|
|
// Search,
|
|
|
Dialog,
|
|
|
- DataTable,
|
|
|
+ DataTable
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
dataId: DATACONTENT_ID.sysQueryTabId,
|
|
|
arr: [
|
|
|
{
|
|
|
- typeName: "名称",
|
|
|
- typeCode: "测试",
|
|
|
- },
|
|
|
+ typeName: '名称',
|
|
|
+ typeCode: '测试'
|
|
|
+ }
|
|
|
], // 内容数据
|
|
|
flag: false, // 删除弹框开关
|
|
|
addFlag: false, // 新增机场信息弹框开关
|
|
@@ -112,183 +137,183 @@ export default {
|
|
|
listDate: {},
|
|
|
rmObj: {
|
|
|
// 删除内容
|
|
|
- name: "",
|
|
|
+ name: ''
|
|
|
},
|
|
|
ruleForm: {
|
|
|
// 新增机场信息表单
|
|
|
- name: "",
|
|
|
- fullName: "",
|
|
|
- code: "",
|
|
|
+ name: '',
|
|
|
+ fullName: '',
|
|
|
+ code: ''
|
|
|
},
|
|
|
EditForm: {
|
|
|
- name: "",
|
|
|
- fullName: "",
|
|
|
- code: "",
|
|
|
+ name: '',
|
|
|
+ fullName: '',
|
|
|
+ code: ''
|
|
|
},
|
|
|
rules: {
|
|
|
// 新增机场信息表单验证
|
|
|
- name: [{ required: true, message: "请输入航司简称", trigger: "blur" }],
|
|
|
- fullName: [
|
|
|
- { required: true, message: "请输入航司全称", trigger: "blur" },
|
|
|
- ],
|
|
|
- code: [
|
|
|
- { required: true, message: "请输入航司二字码", trigger: "blur" },
|
|
|
- ],
|
|
|
+ name: [{ required: true, message: '请输入航司简称', trigger: 'blur' }],
|
|
|
+ fullName: [{ required: true, message: '请输入航司全称', trigger: 'blur' }],
|
|
|
+ code: [{ required: true, message: '请输入航司二字码', trigger: 'blur' }]
|
|
|
},
|
|
|
- modid: "",
|
|
|
- };
|
|
|
+ modid: ''
|
|
|
+ }
|
|
|
},
|
|
|
computed: {
|
|
|
- serachBox () {
|
|
|
+ serachBox() {
|
|
|
if (this.searchInfo) {
|
|
|
- return this.arr.filter((data) => {
|
|
|
- return Object.keys(data).some((key) => {
|
|
|
- return (
|
|
|
- String(data[key]).toLowerCase().indexOf(this.searchInfo) > -1
|
|
|
- );
|
|
|
- });
|
|
|
- });
|
|
|
+ return this.arr.filter(data => {
|
|
|
+ return Object.keys(data).some(key => {
|
|
|
+ return String(data[key]).toLowerCase().indexOf(this.searchInfo) > -1
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
- return this.arr;
|
|
|
- },
|
|
|
+ return this.arr
|
|
|
+ }
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
// this.getAirlines();
|
|
|
// this.exceptionlist();
|
|
|
},
|
|
|
methods: {
|
|
|
// 异常列表查询
|
|
|
- async exceptionlist () {
|
|
|
+ async exceptionlist() {
|
|
|
const params = {
|
|
|
- id: "",
|
|
|
- };
|
|
|
- const result = await exceptiontype(params);
|
|
|
+ id: ''
|
|
|
+ }
|
|
|
+ const result = await exceptiontype(params)
|
|
|
if (Number(result.code) === 0) {
|
|
|
- this.arr = result.returnData;
|
|
|
+ this.arr = result.returnData
|
|
|
}
|
|
|
},
|
|
|
// 搜索
|
|
|
- getSearchData (val) {
|
|
|
- const that = this;
|
|
|
+ getSearchData(val) {
|
|
|
+ const that = this
|
|
|
that.exceptionlist().then(function (data) {
|
|
|
if (val) {
|
|
|
- that.arr = findarrays(that.arr, "typeName", val);
|
|
|
+ that.arr = findarrays(that.arr, 'typeName', val)
|
|
|
} else {
|
|
|
- that.exceptionlist();
|
|
|
+ that.exceptionlist()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
//
|
|
|
},
|
|
|
// 删除信息
|
|
|
- handleMove (item) {
|
|
|
- this.listDate = item;
|
|
|
- this.flag = true;
|
|
|
+ handleMove(item) {
|
|
|
+ this.listDate = item
|
|
|
+ this.flag = true
|
|
|
this.rmObj = {
|
|
|
- name: item.queryTemplateName,
|
|
|
- };
|
|
|
+ name: item.queryTemplateName
|
|
|
+ }
|
|
|
},
|
|
|
- async EditSubmit () {
|
|
|
- let arr = 0;
|
|
|
- this.$refs["ruleFormall"].validate((valid) => {
|
|
|
+ async EditSubmit() {
|
|
|
+ let arr = 0
|
|
|
+ this.$refs['ruleFormall'].validate(valid => {
|
|
|
if (valid) {
|
|
|
- arr = 1;
|
|
|
+ arr = 1
|
|
|
} else {
|
|
|
- arr = 0;
|
|
|
- return false;
|
|
|
+ arr = 0
|
|
|
+ return false
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
if (arr === 1) {
|
|
|
const params = {
|
|
|
id: this.modid.id,
|
|
|
typeName: this.EditForm.name,
|
|
|
- typeCode: this.EditForm.fullName,
|
|
|
- };
|
|
|
- const result = await exceptionadd(params);
|
|
|
+ typeCode: this.EditForm.fullName
|
|
|
+ }
|
|
|
+ const result = await exceptionadd(params)
|
|
|
if (Number(result.code) === 0) {
|
|
|
- this.$message.success("成功");
|
|
|
- this.exceptionlist();
|
|
|
- this.$refs.ruleFormall.resetFields();
|
|
|
+ this.$message.success('成功')
|
|
|
+ this.exceptionlist()
|
|
|
+ this.$refs.ruleFormall.resetFields()
|
|
|
}
|
|
|
- this.EditFlag = false;
|
|
|
+ this.EditFlag = false
|
|
|
}
|
|
|
},
|
|
|
- closeForm () {
|
|
|
- this.$refs.ruleForm.resetFields();
|
|
|
+ closeForm() {
|
|
|
+ this.$refs.ruleForm.resetFields()
|
|
|
},
|
|
|
// 获取模板列表
|
|
|
- async getAirlines () {
|
|
|
+ async getAirlines() {
|
|
|
try {
|
|
|
const res = await Query({
|
|
|
id: 77,
|
|
|
- dataContent: [],
|
|
|
- });
|
|
|
- if (res.code === "0") {
|
|
|
- this.arr = res.returnData;
|
|
|
+ dataContent: []
|
|
|
+ })
|
|
|
+ if (res.code === '0') {
|
|
|
+ this.arr = res.returnData
|
|
|
} else {
|
|
|
- this.$message.error(res.message ?? "失败");
|
|
|
+ this.$message.error(res.message ?? '失败')
|
|
|
}
|
|
|
} catch (error) {
|
|
|
-this.$message.error("失败");
|
|
|
+ this.$message.error('失败')
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 新增机场信息-弹框
|
|
|
- handleAdd () {
|
|
|
- this.$router.push("/systemSettings/queryTemplateadd");
|
|
|
+ handleAdd() {
|
|
|
+ this.$router.push('/systemSettings/queryTemplateadd')
|
|
|
},
|
|
|
// 新增机场信息-弹框
|
|
|
- handleEdit (item) {
|
|
|
+ handleEdit(item) {
|
|
|
// this.modid = item;
|
|
|
// this.EditForm.name = item.typeName;
|
|
|
// this.EditForm.fullName = item.typeCode;
|
|
|
this.$router.push({
|
|
|
- path: "/systemSettings/queryTemplateedit",
|
|
|
- query: { queryTemplateID: item.queryTemplateID },
|
|
|
- });
|
|
|
+ path: '/systemSettings/queryTemplateedit',
|
|
|
+ query: { queryTemplateID: item.queryTemplateID }
|
|
|
+ })
|
|
|
// this.EditForm.code = item.code2;
|
|
|
// this.EditFlag = true;
|
|
|
},
|
|
|
// 新增机场信息-弹框-取消
|
|
|
- resetForm () {
|
|
|
- this.addFlag = false;
|
|
|
- this.EditFlag = false;
|
|
|
- this.ruleForm.name = "";
|
|
|
- this.ruleForm.fullName = "";
|
|
|
- this.$refs.ruleForms.resetFields();
|
|
|
- this.$refs.ruleFormall.resetFields();
|
|
|
+ resetForm() {
|
|
|
+ this.addFlag = false
|
|
|
+ this.EditFlag = false
|
|
|
+ this.ruleForm.name = ''
|
|
|
+ this.ruleForm.fullName = ''
|
|
|
+ this.$refs.ruleForms.resetFields()
|
|
|
+ this.$refs.ruleFormall.resetFields()
|
|
|
},
|
|
|
// 删除
|
|
|
- async remove (data) {
|
|
|
- this.listDate.operate = "3";
|
|
|
+ async remove(data) {
|
|
|
+ this.listDate.operate = '3'
|
|
|
try {
|
|
|
const res = await GeneralDataReception({
|
|
|
serviceId: 5,
|
|
|
- dataContent: JSON.stringify(this.listDate),
|
|
|
- });
|
|
|
- if (res.code === "0") {
|
|
|
- this.$message.success(res.message ?? "成功");
|
|
|
- this.flag = false;
|
|
|
- this.listDate = {};
|
|
|
- this.getAirlines();
|
|
|
+ dataContent: JSON.stringify(this.listDate)
|
|
|
+ })
|
|
|
+ if (res.code === '0') {
|
|
|
+ this.$message.success(res.message ?? '成功')
|
|
|
+ this.flag = false
|
|
|
+ this.listDate = {}
|
|
|
+ this.getAirlines()
|
|
|
} else {
|
|
|
- this.$message.error(res.message ?? "失败");
|
|
|
+ this.$message.error(res.message ?? '失败')
|
|
|
}
|
|
|
} catch (error) {
|
|
|
-this.$message.error("失败");
|
|
|
+ this.$message.error('失败')
|
|
|
}
|
|
|
},
|
|
|
// 查询模板预览
|
|
|
- handlePreview ({ queryTemplateID, queryTemplateName }) {
|
|
|
+ handlePreview({ queryTemplateID, queryTemplateName, queryTemplate }) {
|
|
|
+ const reg = /(\《(.+?)\》)|\?/g
|
|
|
+ const basicParamsNumber = queryTemplate.match(reg)?.length
|
|
|
+ const query = {
|
|
|
+ queryTemplateID,
|
|
|
+ queryTemplateName
|
|
|
+ }
|
|
|
+ if (basicParamsNumber) {
|
|
|
+ Object.assign(query, { basicParamsNumber })
|
|
|
+ }
|
|
|
this.$router.push({
|
|
|
path: '/systemSettings/queryTemplatePreview',
|
|
|
- query: {
|
|
|
- queryTemplateID,
|
|
|
- queryTemplateName
|
|
|
- }
|
|
|
+ query
|
|
|
})
|
|
|
}
|
|
|
- },
|
|
|
-};
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -302,7 +327,7 @@ this.$message.error("失败");
|
|
|
background: #eb2f3b;
|
|
|
border-radius: 50%;
|
|
|
margin-right: 15px;
|
|
|
- background: url("../../../../assets/index/ic_close_hint.png") no-repeat;
|
|
|
+ background: url('../../../../assets/index/ic_close_hint.png') no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
.er {
|