|
@@ -337,6 +337,17 @@
|
|
v-model="tableForm[item.columnName]"
|
|
v-model="tableForm[item.columnName]"
|
|
></el-input>
|
|
></el-input>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template v-else-if="item.dataType == 'datetime'">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
+ v-model="tableForm[item.columnName]"
|
|
|
|
+ :rows="1"
|
|
|
|
+ type="datetime"
|
|
|
|
+ placeholder="选择日期时间"
|
|
|
|
+ @change="inputChangeHandler(item.columnName)"
|
|
|
|
+ >
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </template>
|
|
<template v-else>
|
|
<template v-else>
|
|
<el-input
|
|
<el-input
|
|
size="small"
|
|
size="small"
|
|
@@ -393,7 +404,12 @@ import { setTableFilters } from "@/utils/table";
|
|
import Dialog from "@/layout/components/Dialog/index.vue";
|
|
import Dialog from "@/layout/components/Dialog/index.vue";
|
|
import NoData from "@/components/nodata";
|
|
import NoData from "@/components/nodata";
|
|
import { translateDataToTreeAllTreeMsg } from "@/utils/validate";
|
|
import { translateDataToTreeAllTreeMsg } from "@/utils/validate";
|
|
-import { Query, GeneralDataReception, Start, Stop } from "@/api/dataIntegration";
|
|
|
|
|
|
+import {
|
|
|
|
+ Query,
|
|
|
|
+ GeneralDataReception,
|
|
|
|
+ Start,
|
|
|
|
+ Stop,
|
|
|
|
+} from "@/api/dataIntegration";
|
|
export default {
|
|
export default {
|
|
name: "DataTable",
|
|
name: "DataTable",
|
|
props: {
|
|
props: {
|
|
@@ -401,6 +417,10 @@ export default {
|
|
type: Boolean,
|
|
type: Boolean,
|
|
default: true,
|
|
default: true,
|
|
},
|
|
},
|
|
|
|
+ tableup: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: false,
|
|
|
|
+ },
|
|
//接口ID
|
|
//接口ID
|
|
dataId: {
|
|
dataId: {
|
|
type: [String, Number],
|
|
type: [String, Number],
|
|
@@ -561,7 +581,7 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
components: { Dialog, NoData },
|
|
components: { Dialog, NoData },
|
|
- data () {
|
|
|
|
|
|
+ data() {
|
|
return {
|
|
return {
|
|
asShow: true,
|
|
asShow: true,
|
|
loading: false,
|
|
loading: false,
|
|
@@ -593,7 +613,7 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- dataTableContentStyle () {
|
|
|
|
|
|
+ dataTableContentStyle() {
|
|
const style = {};
|
|
const style = {};
|
|
if (this.minHeight) {
|
|
if (this.minHeight) {
|
|
style["min-height"] = this.minHeight;
|
|
style["min-height"] = this.minHeight;
|
|
@@ -604,22 +624,30 @@ export default {
|
|
return style;
|
|
return style;
|
|
},
|
|
},
|
|
//设置表头-下拉-箭头样式
|
|
//设置表头-下拉-箭头样式
|
|
- arrowClass () {
|
|
|
|
|
|
+ arrowClass() {
|
|
return function (prop) {
|
|
return function (prop) {
|
|
let classString = "";
|
|
let classString = "";
|
|
if (this.colShowFilter === prop) {
|
|
if (this.colShowFilter === prop) {
|
|
return "arrow-active";
|
|
return "arrow-active";
|
|
}
|
|
}
|
|
- if (Object.entries(this.tableDataFilters).find(([key, arr]) => this.filterValues[prop])) {
|
|
|
|
|
|
+ if (
|
|
|
|
+ Object.entries(this.tableDataFilters).find(
|
|
|
|
+ ([key, arr]) => this.filterValues[prop]
|
|
|
|
+ )
|
|
|
|
+ ) {
|
|
classString += "arrow-blue";
|
|
classString += "arrow-blue";
|
|
}
|
|
}
|
|
return classString;
|
|
return classString;
|
|
};
|
|
};
|
|
},
|
|
},
|
|
//设置表头-下拉-选中数据
|
|
//设置表头-下拉-选中数据
|
|
- filteredTableData () {
|
|
|
|
|
|
+ filteredTableData() {
|
|
if (this.isTree) {
|
|
if (this.isTree) {
|
|
- this.tableData = translateDataToTreeAllTreeMsg(this.tableData, "parentID", "companyID");
|
|
|
|
|
|
+ this.tableData = translateDataToTreeAllTreeMsg(
|
|
|
|
+ this.tableData,
|
|
|
|
+ "parentID",
|
|
|
|
+ "companyID"
|
|
|
|
+ );
|
|
}
|
|
}
|
|
return this.tableData.filter((item) => {
|
|
return this.tableData.filter((item) => {
|
|
let flag = true;
|
|
let flag = true;
|
|
@@ -631,35 +659,35 @@ export default {
|
|
return flag;
|
|
return flag;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- btnAuthAdd () {
|
|
|
|
|
|
+ btnAuthAdd() {
|
|
if (this.roles.includes(this.authAdd)) {
|
|
if (this.roles.includes(this.authAdd)) {
|
|
return true;
|
|
return true;
|
|
} else {
|
|
} else {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- btnAuthEdit () {
|
|
|
|
|
|
+ btnAuthEdit() {
|
|
if (this.roles.includes(this.authEdit)) {
|
|
if (this.roles.includes(this.authEdit)) {
|
|
return true;
|
|
return true;
|
|
} else {
|
|
} else {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- btnAuthDel () {
|
|
|
|
|
|
+ btnAuthDel() {
|
|
if (this.roles.includes(this.authDel)) {
|
|
if (this.roles.includes(this.authDel)) {
|
|
return true;
|
|
return true;
|
|
} else {
|
|
} else {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- btnAuthWithnodeSet () {
|
|
|
|
|
|
+ btnAuthWithnodeSet() {
|
|
if (this.roles.includes(this.authWithnodeSet)) {
|
|
if (this.roles.includes(this.authWithnodeSet)) {
|
|
return true;
|
|
return true;
|
|
} else {
|
|
} else {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- btnAuthWithlodSet () {
|
|
|
|
|
|
+ btnAuthWithlodSet() {
|
|
if (this.roles.includes(this.authWithlodSet)) {
|
|
if (this.roles.includes(this.authWithlodSet)) {
|
|
return true;
|
|
return true;
|
|
} else {
|
|
} else {
|
|
@@ -669,7 +697,7 @@ export default {
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
dataContent: {
|
|
dataContent: {
|
|
- handler (val) {
|
|
|
|
|
|
+ handler(val) {
|
|
if (val) {
|
|
if (val) {
|
|
if (val.companyID) {
|
|
if (val.companyID) {
|
|
this.resetTable();
|
|
this.resetTable();
|
|
@@ -690,14 +718,14 @@ export default {
|
|
// },
|
|
// },
|
|
// },
|
|
// },
|
|
},
|
|
},
|
|
- mounted () {
|
|
|
|
|
|
+ mounted() {
|
|
this.getQuery();
|
|
this.getQuery();
|
|
},
|
|
},
|
|
- updated () {
|
|
|
|
|
|
+ updated() {
|
|
this.$refs["table"]?.doLayout();
|
|
this.$refs["table"]?.doLayout();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- load () {
|
|
|
|
|
|
+ load() {
|
|
//
|
|
//
|
|
if (!this.isTree) {
|
|
if (!this.isTree) {
|
|
if (this.noMore || this.loading) {
|
|
if (this.noMore || this.loading) {
|
|
@@ -706,7 +734,7 @@ export default {
|
|
this.getQuery();
|
|
this.getQuery();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- resetTable () {
|
|
|
|
|
|
+ resetTable() {
|
|
this.page = 0;
|
|
this.page = 0;
|
|
this.noMore = false;
|
|
this.noMore = false;
|
|
this.tableData = [];
|
|
this.tableData = [];
|
|
@@ -746,13 +774,13 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- inputChangeHandler (data) {
|
|
|
|
|
|
+ inputChangeHandler(data) {
|
|
if (this.tableForm[data] === "") {
|
|
if (this.tableForm[data] === "") {
|
|
this.tableForm[data] = null;
|
|
this.tableForm[data] = null;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//获取表格数据
|
|
//获取表格数据
|
|
- async getQuery () {
|
|
|
|
|
|
+ async getQuery() {
|
|
try {
|
|
try {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
const { code, returnData } = await Query({
|
|
const { code, returnData } = await Query({
|
|
@@ -766,7 +794,9 @@ export default {
|
|
this.noMore = true;
|
|
this.noMore = true;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
}
|
|
}
|
|
- const titleColumn = returnData.columnSet.find((item) => item.needShow === 1);
|
|
|
|
|
|
+ const titleColumn = returnData.columnSet.find(
|
|
|
|
+ (item) => item.needShow === 1
|
|
|
|
+ );
|
|
if (titleColumn) {
|
|
if (titleColumn) {
|
|
this.rowTitle = titleColumn.columnName;
|
|
this.rowTitle = titleColumn.columnName;
|
|
}
|
|
}
|
|
@@ -785,11 +815,10 @@ export default {
|
|
} catch (error) {
|
|
} catch (error) {
|
|
this.page--;
|
|
this.page--;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
-
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//表格-增/删/改
|
|
//表格-增/删/改
|
|
- async generalDataReception (data) {
|
|
|
|
|
|
+ async generalDataReception(data) {
|
|
try {
|
|
try {
|
|
data = {
|
|
data = {
|
|
...data,
|
|
...data,
|
|
@@ -815,7 +844,6 @@ export default {
|
|
this.tableForm = {};
|
|
this.tableForm = {};
|
|
}
|
|
}
|
|
} catch (error) {
|
|
} catch (error) {
|
|
-
|
|
|
|
this.flag = false;
|
|
this.flag = false;
|
|
this.rmFlag = false;
|
|
this.rmFlag = false;
|
|
this.tableObj = {};
|
|
this.tableObj = {};
|
|
@@ -823,18 +851,18 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 表格勾选
|
|
// 表格勾选
|
|
- toggleRowSelection (row, isSelected) {
|
|
|
|
|
|
+ toggleRowSelection(row, isSelected) {
|
|
this.$refs["table"].toggleRowSelection(row, isSelected);
|
|
this.$refs["table"].toggleRowSelection(row, isSelected);
|
|
},
|
|
},
|
|
// 表格初始勾选
|
|
// 表格初始勾选
|
|
- selectTableRows (tableData, selectFlagName) {
|
|
|
|
|
|
+ selectTableRows(tableData, selectFlagName) {
|
|
tableData.forEach((row) => {
|
|
tableData.forEach((row) => {
|
|
this.$refs["table"].toggleRowSelection(row, !!row[selectFlagName]);
|
|
this.$refs["table"].toggleRowSelection(row, !!row[selectFlagName]);
|
|
});
|
|
});
|
|
this.$emit("selectionAll", this.$refs.table.selection);
|
|
this.$emit("selectionAll", this.$refs.table.selection);
|
|
},
|
|
},
|
|
//初始化表格
|
|
//初始化表格
|
|
- initTableData () {
|
|
|
|
|
|
+ initTableData() {
|
|
this.tableColsCopy = this.tableCols.filter((item) => item.needShow);
|
|
this.tableColsCopy = this.tableCols.filter((item) => item.needShow);
|
|
//
|
|
//
|
|
// debugger;
|
|
// debugger;
|
|
@@ -851,7 +879,9 @@ export default {
|
|
// const reqUt = this.getSelectData(item.listqueryTemplateID)
|
|
// const reqUt = this.getSelectData(item.listqueryTemplateID)
|
|
// reqUts.push(reqUt)
|
|
// reqUts.push(reqUt)
|
|
if (!this.tableOptions[item.columnName]) {
|
|
if (!this.tableOptions[item.columnName]) {
|
|
- this.tableOptions[item.columnName] = await this.getSelectData(item.listqueryTemplateID);
|
|
|
|
|
|
+ this.tableOptions[item.columnName] = await this.getSelectData(
|
|
|
|
+ item.listqueryTemplateID
|
|
|
|
+ );
|
|
}
|
|
}
|
|
//
|
|
//
|
|
}
|
|
}
|
|
@@ -863,7 +893,7 @@ export default {
|
|
// this.getSelectDataAll(reqUts)
|
|
// this.getSelectDataAll(reqUts)
|
|
},
|
|
},
|
|
//获取所有获取弹框-下拉数据-请求状态
|
|
//获取所有获取弹框-下拉数据-请求状态
|
|
- getSelectDataAll (reqUts) {
|
|
|
|
|
|
+ getSelectDataAll(reqUts) {
|
|
Promise.all(reqUts)
|
|
Promise.all(reqUts)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.proAll = true;
|
|
this.proAll = true;
|
|
@@ -885,7 +915,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//重组table-显示名称
|
|
//重组table-显示名称
|
|
- setTable () {
|
|
|
|
|
|
+ setTable() {
|
|
this.tableArrs.forEach((item) => {
|
|
this.tableArrs.forEach((item) => {
|
|
this.tableOptions[item].forEach((p) => {
|
|
this.tableOptions[item].forEach((p) => {
|
|
this.tableDataCopy.forEach((msg) => {
|
|
this.tableDataCopy.forEach((msg) => {
|
|
@@ -904,7 +934,7 @@ export default {
|
|
this.tableData = this.tableDataCopy;
|
|
this.tableData = this.tableDataCopy;
|
|
},
|
|
},
|
|
//分组
|
|
//分组
|
|
- tableGroup (tableData) {
|
|
|
|
|
|
+ tableGroup(tableData) {
|
|
const spanArr = [];
|
|
const spanArr = [];
|
|
let pos = 0;
|
|
let pos = 0;
|
|
let ifYj = this.tableGroups[0];
|
|
let ifYj = this.tableGroups[0];
|
|
@@ -924,14 +954,14 @@ export default {
|
|
this.spanArr = spanArr;
|
|
this.spanArr = spanArr;
|
|
this.pos = pos;
|
|
this.pos = pos;
|
|
},
|
|
},
|
|
- popoverShowHandler (prop) {
|
|
|
|
|
|
+ popoverShowHandler(prop) {
|
|
this.colShowFilter = prop;
|
|
this.colShowFilter = prop;
|
|
},
|
|
},
|
|
- popoverHideHandler () {
|
|
|
|
|
|
+ popoverHideHandler() {
|
|
this.colShowFilter = "";
|
|
this.colShowFilter = "";
|
|
},
|
|
},
|
|
//分组
|
|
//分组
|
|
- tableSpanMethod ({ row, column, rowIndex, columnIndex }) {
|
|
|
|
|
|
+ tableSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
if (this.tableGroups.includes(column["property"])) {
|
|
if (this.tableGroups.includes(column["property"])) {
|
|
const _row = this.spanArr[rowIndex];
|
|
const _row = this.spanArr[rowIndex];
|
|
const _col = _row > 0 ? 1 : 0;
|
|
const _col = _row > 0 ? 1 : 0;
|
|
@@ -942,7 +972,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//合计
|
|
//合计
|
|
- getSummaries (param) {
|
|
|
|
|
|
+ getSummaries(param) {
|
|
const { columns, data } = param;
|
|
const { columns, data } = param;
|
|
const sums = [];
|
|
const sums = [];
|
|
columns.forEach((column, index) => {
|
|
columns.forEach((column, index) => {
|
|
@@ -966,15 +996,13 @@ export default {
|
|
return sums;
|
|
return sums;
|
|
},
|
|
},
|
|
//弹框-确定
|
|
//弹框-确定
|
|
- handleOk () {
|
|
|
|
|
|
+ handleOk() {
|
|
this.submitClickHandler();
|
|
this.submitClickHandler();
|
|
},
|
|
},
|
|
//滚动
|
|
//滚动
|
|
- tableLoad () {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
|
|
+ tableLoad() {},
|
|
//表格-新增
|
|
//表格-新增
|
|
- handleAdd () {
|
|
|
|
|
|
+ handleAdd() {
|
|
// this.flag = true;
|
|
// this.flag = true;
|
|
// this.tableType = "add";
|
|
// this.tableType = "add";
|
|
// this.tableTitle = "新增";
|
|
// this.tableTitle = "新增";
|
|
@@ -1072,16 +1100,11 @@ export default {
|
|
this.tableType = "edit";
|
|
this.tableType = "edit";
|
|
this.tableTitle = "编辑";
|
|
this.tableTitle = "编辑";
|
|
} else {
|
|
} else {
|
|
- this.tableForm = JSON.parse(JSON.stringify(row));
|
|
|
|
|
|
+ this.$emit("handleEdit", row);
|
|
}
|
|
}
|
|
- this.flag = true;
|
|
|
|
- this.tableType = "edit";
|
|
|
|
- this.tableTitle = "编辑";
|
|
|
|
- } else {
|
|
|
|
- this.$emit("handleEdit", row);
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async queryOriginRow (editId, queryTemplateColumnSetID) {
|
|
|
|
|
|
+ async queryOriginRow(editId, queryTemplateColumnSetID) {
|
|
try {
|
|
try {
|
|
const { code, returnData } = await Query({
|
|
const { code, returnData } = await Query({
|
|
id: editId,
|
|
id: editId,
|
|
@@ -1092,16 +1115,14 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$message.error("失败");
|
|
this.$message.error("失败");
|
|
}
|
|
}
|
|
- } catch (error) {
|
|
|
|
- this.$message.error("失败");
|
|
|
|
- }
|
|
|
|
|
|
+ } catch (error) {}
|
|
},
|
|
},
|
|
//表格-跳转
|
|
//表格-跳转
|
|
- handleHerf (row) {
|
|
|
|
|
|
+ handleHerf(row) {
|
|
alert("跳转");
|
|
alert("跳转");
|
|
},
|
|
},
|
|
// 新增/编辑-确认
|
|
// 新增/编辑-确认
|
|
- submitClickHandler () {
|
|
|
|
|
|
+ submitClickHandler() {
|
|
this.$refs["ruleForm"].validate((valid) => {
|
|
this.$refs["ruleForm"].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.tableType == "add") {
|
|
if (this.tableType == "add") {
|
|
@@ -1116,19 +1137,19 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//表格-删除
|
|
//表格-删除
|
|
- handleRemove (row) {
|
|
|
|
|
|
+ handleRemove(row) {
|
|
this.rmFlag = true;
|
|
this.rmFlag = true;
|
|
// this.rmTitle = row.className || row.username || row.serviceName || row.queryTemplateName;
|
|
// this.rmTitle = row.className || row.username || row.serviceName || row.queryTemplateName;
|
|
this.rmTitle = row[this.rowTitle];
|
|
this.rmTitle = row[this.rowTitle];
|
|
this.tableObj = row;
|
|
this.tableObj = row;
|
|
},
|
|
},
|
|
//表格-删除-确认
|
|
//表格-删除-确认
|
|
- tableRemove () {
|
|
|
|
|
|
+ tableRemove() {
|
|
this.tableObj.event = 3;
|
|
this.tableObj.event = 3;
|
|
this.generalDataReception(this.tableObj);
|
|
this.generalDataReception(this.tableObj);
|
|
},
|
|
},
|
|
// 表格-跳转列设置页
|
|
// 表格-跳转列设置页
|
|
- handleColumnSet (row) {
|
|
|
|
|
|
+ handleColumnSet(row) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: "/systemSettings/queryTemplateChild",
|
|
path: "/systemSettings/queryTemplateChild",
|
|
query: {
|
|
query: {
|
|
@@ -1137,7 +1158,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 表格-跳转数据项设置页
|
|
// 表格-跳转数据项设置页
|
|
- handleItemSet (row) {
|
|
|
|
|
|
+ handleItemSet(row) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: "/systemSettings/datastructureChild",
|
|
path: "/systemSettings/datastructureChild",
|
|
query: {
|
|
query: {
|
|
@@ -1146,7 +1167,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 表格-跳转航站设置页
|
|
// 表格-跳转航站设置页
|
|
- handlelodSet (row) {
|
|
|
|
|
|
+ handlelodSet(row) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: "/BasicsData/airportInfoChild",
|
|
path: "/BasicsData/airportInfoChild",
|
|
query: {
|
|
query: {
|
|
@@ -1155,7 +1176,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 表格-节点置页
|
|
// 表格-节点置页
|
|
- handlenodeSet (row) {
|
|
|
|
|
|
+ handlenodeSet(row) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: "/BasicsData/deployNodeChild",
|
|
path: "/BasicsData/deployNodeChild",
|
|
query: {
|
|
query: {
|
|
@@ -1164,7 +1185,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 表格-查看
|
|
// 表格-查看
|
|
- handleLook (row) {
|
|
|
|
|
|
+ handleLook(row) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
name: "serviceTopology",
|
|
name: "serviceTopology",
|
|
params: {
|
|
params: {
|
|
@@ -1174,21 +1195,21 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 表格-启动/停止
|
|
// 表格-启动/停止
|
|
- async stateChangeHandler (row) {
|
|
|
|
|
|
+ async stateChangeHandler(row) {
|
|
const runState = row.runState == "运行" ? 0 : 1;
|
|
const runState = row.runState == "运行" ? 0 : 1;
|
|
const serviceID = row.serviceID;
|
|
const serviceID = row.serviceID;
|
|
// this.changeBtn(runState, serviceID);
|
|
// this.changeBtn(runState, serviceID);
|
|
this.changeState(runState, serviceID);
|
|
this.changeState(runState, serviceID);
|
|
},
|
|
},
|
|
// 表格-选中行
|
|
// 表格-选中行
|
|
- selectHandler (selection, row) {
|
|
|
|
|
|
+ selectHandler(selection, row) {
|
|
this.$emit("selection-change", selection, row);
|
|
this.$emit("selection-change", selection, row);
|
|
},
|
|
},
|
|
// 表格-查询模板预览
|
|
// 表格-查询模板预览
|
|
- handlePreview (row) {
|
|
|
|
|
|
+ handlePreview(row) {
|
|
this.$emit("preview", row);
|
|
this.$emit("preview", row);
|
|
},
|
|
},
|
|
- async changeBtn (state, id) {
|
|
|
|
|
|
+ async changeBtn(state, id) {
|
|
let res = null;
|
|
let res = null;
|
|
// const { code, message } = await GeneralDataReception({
|
|
// const { code, message } = await GeneralDataReception({
|
|
// serviceId: 61,
|
|
// serviceId: 61,
|
|
@@ -1211,7 +1232,7 @@ export default {
|
|
this.$message.error(res.message);
|
|
this.$message.error(res.message);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async changeState (runState, serviceID) {
|
|
|
|
|
|
+ async changeState(runState, serviceID) {
|
|
try {
|
|
try {
|
|
const operate = runState ? "start" : "stop";
|
|
const operate = runState ? "start" : "stop";
|
|
const {
|
|
const {
|
|
@@ -1244,9 +1265,7 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$message.error("查询节点失败");
|
|
this.$message.error("查询节点失败");
|
|
}
|
|
}
|
|
- } catch (error) {
|
|
|
|
- this.$message.error("失败");
|
|
|
|
- }
|
|
|
|
|
|
+ } catch (error) {}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|