|
@@ -337,17 +337,6 @@
|
|
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"
|
|
@@ -404,12 +393,7 @@ 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: {
|
|
@@ -417,10 +401,6 @@ 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],
|
|
@@ -581,7 +561,7 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
components: { Dialog, NoData },
|
|
components: { Dialog, NoData },
|
|
- data() {
|
|
|
|
|
|
+ data () {
|
|
return {
|
|
return {
|
|
asShow: true,
|
|
asShow: true,
|
|
loading: false,
|
|
loading: false,
|
|
@@ -613,7 +593,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;
|
|
@@ -624,30 +604,22 @@ 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;
|
|
@@ -659,35 +631,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 {
|
|
@@ -697,7 +669,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();
|
|
@@ -718,14 +690,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) {
|
|
@@ -734,7 +706,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 = [];
|
|
@@ -774,13 +746,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({
|
|
@@ -794,9 +766,7 @@ 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;
|
|
}
|
|
}
|
|
@@ -815,10 +785,11 @@ 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,
|
|
@@ -844,6 +815,7 @@ 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 = {};
|
|
@@ -851,18 +823,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;
|
|
@@ -879,9 +851,7 @@ 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);
|
|
}
|
|
}
|
|
//
|
|
//
|
|
}
|
|
}
|
|
@@ -893,7 +863,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;
|
|
@@ -915,7 +885,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) => {
|
|
@@ -934,7 +904,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];
|
|
@@ -954,14 +924,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;
|
|
@@ -972,7 +942,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) => {
|
|
@@ -996,13 +966,15 @@ 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 = "新增";
|
|
@@ -1100,11 +1072,16 @@ export default {
|
|
this.tableType = "edit";
|
|
this.tableType = "edit";
|
|
this.tableTitle = "编辑";
|
|
this.tableTitle = "编辑";
|
|
} else {
|
|
} else {
|
|
- this.$emit("handleEdit", row);
|
|
|
|
|
|
+ this.tableForm = JSON.parse(JSON.stringify(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,
|
|
@@ -1115,14 +1092,16 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$message.error("失败");
|
|
this.$message.error("失败");
|
|
}
|
|
}
|
|
- } catch (error) {}
|
|
|
|
|
|
+ } catch (error) {
|
|
|
|
+ this.$message.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") {
|
|
@@ -1137,19 +1116,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: {
|
|
@@ -1158,7 +1137,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 表格-跳转数据项设置页
|
|
// 表格-跳转数据项设置页
|
|
- handleItemSet(row) {
|
|
|
|
|
|
+ handleItemSet (row) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: "/systemSettings/datastructureChild",
|
|
path: "/systemSettings/datastructureChild",
|
|
query: {
|
|
query: {
|
|
@@ -1167,7 +1146,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 表格-跳转航站设置页
|
|
// 表格-跳转航站设置页
|
|
- handlelodSet(row) {
|
|
|
|
|
|
+ handlelodSet (row) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: "/BasicsData/airportInfoChild",
|
|
path: "/BasicsData/airportInfoChild",
|
|
query: {
|
|
query: {
|
|
@@ -1176,7 +1155,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 表格-节点置页
|
|
// 表格-节点置页
|
|
- handlenodeSet(row) {
|
|
|
|
|
|
+ handlenodeSet (row) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: "/BasicsData/deployNodeChild",
|
|
path: "/BasicsData/deployNodeChild",
|
|
query: {
|
|
query: {
|
|
@@ -1185,7 +1164,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 表格-查看
|
|
// 表格-查看
|
|
- handleLook(row) {
|
|
|
|
|
|
+ handleLook (row) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
name: "serviceTopology",
|
|
name: "serviceTopology",
|
|
params: {
|
|
params: {
|
|
@@ -1195,21 +1174,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,
|
|
@@ -1232,7 +1211,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 {
|
|
@@ -1265,7 +1244,9 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$message.error("查询节点失败");
|
|
this.$message.error("查询节点失败");
|
|
}
|
|
}
|
|
- } catch (error) {}
|
|
|
|
|
|
+ } catch (error) {
|
|
|
|
+ this.$message.error("失败");
|
|
|
|
+ }
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|