|
@@ -0,0 +1,1159 @@
|
|
|
+<template>
|
|
|
+ <div class="newService">
|
|
|
+ <div class="newService-head flex-wrap">
|
|
|
+ <div class="manageTitle">{{ title }}</div>
|
|
|
+ <div class="icons flex-wrap">
|
|
|
+ <div class="icons-list start">
|
|
|
+ <span class="icons-list-box"></span>
|
|
|
+ <span class="icons-list-text">启用</span>
|
|
|
+ </div>
|
|
|
+ <div class="icons-list stop">
|
|
|
+ <span class="icons-list-box"></span>
|
|
|
+ <span class="icons-list-text">停用</span>
|
|
|
+ </div>
|
|
|
+ <div class="icons-list error">
|
|
|
+ <span class="icons-list-box"></span>
|
|
|
+ <span class="icons-list-text">异常</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="newService-content flex-wrap">
|
|
|
+ <div class="newService-content-left">
|
|
|
+ <div class="newService-content-left-top">
|
|
|
+ <div class="flex head">
|
|
|
+ <div class="title">机器列表</div>
|
|
|
+ <!-- <el-button @click="handleAdd" class="serButton" size="small">新增</el-button> -->
|
|
|
+ </div>
|
|
|
+ <div class="search">
|
|
|
+ <el-input size="small" placeholder="请输入内容" clearable prefix-icon="el-icon-search" v-model="searchs">
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="newService-content-left-bottom">
|
|
|
+ <template v-if="dataLists.length">
|
|
|
+ <el-scrollbar ref="scroll" style="height: 100%">
|
|
|
+ <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
|
|
|
+ <div v-for="(item,index) in dataLists" :key="index" @click.stop="handleClicks(item,index)" :class="index == activeIndex1 ? 'active':''" class="contents flex">
|
|
|
+ <div class="left">
|
|
|
+ <span :class="item.runState ? 'success' : 'error'" class="box"></span>
|
|
|
+ <el-tooltip class="item" effect="dark" :content="item.serviceName" placement="top">
|
|
|
+ <span class="txt">{{ item.serviceName }}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-show="activeIndex1 == index" class="right">
|
|
|
+ <template>
|
|
|
+ <template>
|
|
|
+ <span class="start">启用</span>
|
|
|
+ <span class="stop">停用</span>
|
|
|
+ <span class="start">重启</span>
|
|
|
+ </template>
|
|
|
+ <!-- <template v-else>
|
|
|
+ <span @click.stop="handleRest(item)" class="rest">重置</span>
|
|
|
+ </template> -->
|
|
|
+ </template>
|
|
|
+ <!-- <span @click.stop="handleError" class="error">删除</span> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-scrollbar>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-empty description="暂无数据"></el-empty>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="newService-content-left">
|
|
|
+ <div class="newService-content-left-top">
|
|
|
+ <div class="flex head">
|
|
|
+ <div class="title">服务列表</div>
|
|
|
+ <!-- <el-button @click="handleAdd" class="serButton" size="small">新增</el-button> -->
|
|
|
+ </div>
|
|
|
+ <div class="search">
|
|
|
+ <el-input size="small" placeholder="请输入内容" clearable prefix-icon="el-icon-search" v-model="search">
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="newService-content-left-bottom">
|
|
|
+ <template v-if="dataList.length">
|
|
|
+ <el-scrollbar ref="scroll" style="height: 100%">
|
|
|
+ <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
|
|
|
+ <div v-for="(item,index) in dataList" :key="index" @click.stop="handleClick(item,index)" :class="index == activeIndex ? 'active':''" class="contents flex">
|
|
|
+ <div class="left">
|
|
|
+ <span :class="item.runState ? 'success' : 'error'" class="box"></span>
|
|
|
+ <el-tooltip class="item" effect="dark" :content="item.serviceName" placement="top">
|
|
|
+ <span class="txt">{{ item.serviceName }}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-show="activeIndex == index" class="right">
|
|
|
+ <template>
|
|
|
+ <template>
|
|
|
+ <span class="start">启用</span>
|
|
|
+ <span class="stop">停用</span>
|
|
|
+ <span class="start">重启</span>
|
|
|
+ </template>
|
|
|
+ <!-- <template v-else>
|
|
|
+ <span @click.stop="handleRest(item)" class="rest">重置</span>
|
|
|
+ </template> -->
|
|
|
+ </template>
|
|
|
+ <!-- <span @click.stop="handleError" class="error">删除</span> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-scrollbar>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-empty description="暂无数据"></el-empty>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="newService-content-right">
|
|
|
+ <div style="height: calc(100% - 280px);" class="data-table">
|
|
|
+ <!-- <Table :dataId="dataId" :dataContent="msgContent" width="860px" tableHeight="calc(100% - 30px)" dataTitle="算法列表" /> -->
|
|
|
+ <!-- <template>
|
|
|
+ <el-table
|
|
|
+ :height="tableHeight ? tableHeight : minHeight - 8 + 'vh'" class="table infinite-list"
|
|
|
+ style="width: 100%; overflow: auto"
|
|
|
+ border
|
|
|
+ :show-summary="showSummary"
|
|
|
+ stripe
|
|
|
+ :row-key="rowKeyTree"
|
|
|
+ :tree-props="treeProps"
|
|
|
+ :data="tableData">
|
|
|
+ <el-table-column
|
|
|
+ :show-overflow-tooltip="false" :formtter="formtter"
|
|
|
+ prop="date"
|
|
|
+ label="日期">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="name"
|
|
|
+ :show-overflow-tooltip="false" :formtter="formtter"
|
|
|
+ label="姓名">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini">编辑</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="danger">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template> -->
|
|
|
+ <el-table :data="filteredTableData" :summary-method="getSummaries" :span-method="tableSpanMethod" :tree-props="treeProps" :row-key="rowKeyTree" stripe :show-summary="showSummary" border ref="table" :height="tableHeight ? tableHeight : minHeight - 8 + 'vh'" class="table infinite-list" style="width: 100%; overflow: auto" @select="selectHandler">
|
|
|
+ <el-table-column v-for="(item, index) in tableColsCopy" :sortable="item.needSort ? true : false" :key="index" :prop="item.columnName" :label="item.columnLabel" :show-overflow-tooltip="showOverflowTooltip" :formtter="formtter">
|
|
|
+ <template #header>
|
|
|
+ <span class="colTips">
|
|
|
+ <el-tooltip :content="item.columnDescribe" placement="top">
|
|
|
+ <span>{{ item.columnLabel }}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+ <span v-if="item.needFilters">
|
|
|
+ <el-popover placement="bottom" trigger="click" @show="popoverShowHandler(item.columnName)" @hide="popoverHideHandler">
|
|
|
+ <i slot="reference" :class="[
|
|
|
+ 'filter-arrow',
|
|
|
+ 'el-icon-arrow-down',
|
|
|
+ arrowClass(item.columnName),
|
|
|
+ ]" />
|
|
|
+ <el-form>
|
|
|
+ <el-form-item :label="item.columnLabel">
|
|
|
+ <el-select v-model="filterValues[item.columnName]" size="small" placeholder="筛选" default-first-option filterable clearable>
|
|
|
+ <el-option v-for="(option, optionIndex) in tableDataFilters[
|
|
|
+ item.columnName
|
|
|
+ ]" :key="option.value + optionIndex" :value="option.value" :label="option.text" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-popover>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" :width="fixedWidth">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="hd-td">
|
|
|
+ <el-button type="text" @click="handleEdit(scope.row)" size="small" class="rmScs">编辑</el-button>
|
|
|
+ <el-button class="rmSc" type="text" @click="handleRemove(scope.row)" size="small">删除</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <Dialog :flag="rmFlag">
|
|
|
+ <div class="airportInfoDialog">
|
|
|
+ <div class="title del-title">删除</div>
|
|
|
+ <div class="content del-content">
|
|
|
+ <span class="el-icon-error error r10"></span>您是否确认删除<span class="error l10">{{ dataObj.serviceName }}</span>
|
|
|
+ ?
|
|
|
+ </div>
|
|
|
+ <div class="foot right Delfoot">
|
|
|
+ <el-button size="medium" class="r24" @click="tableRemove" type="danger">删除</el-button>
|
|
|
+ <el-button size="medium" @click="rmFlag = false">取消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import Table from '@/views/newTable/index.vue'
|
|
|
+import Dialog from "@/layout/components/Dialog/index.vue"
|
|
|
+import { Query, newData, modifyData, moveData, start, stop } from "@/api/webApi"
|
|
|
+import pf from '@/layout/mixin/publicFunc'
|
|
|
+import * as _ from 'lodash'
|
|
|
+export default {
|
|
|
+ name: 'NewService',
|
|
|
+ props: {
|
|
|
+ //表格高度
|
|
|
+ tableHeight: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: 0,
|
|
|
+ },
|
|
|
+ // 是否显示合计行
|
|
|
+ showSummary: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mixins: [pf],
|
|
|
+ components: { Table, Dialog },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ title: '服务设置',
|
|
|
+ search: '',
|
|
|
+ searchs: '',
|
|
|
+ arrs: [{
|
|
|
+ "serviceID": 1,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "权限管理",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-29T11:48:24"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 2,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "用户获取功能权限",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-29T14:31:25"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 3,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "服务管理",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-29T14:32:49"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 4,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "数据源管理",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-29T14:32:16"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 5,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "用户数据权限获取",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-29T14:30:32"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 8,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "算法管理",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-29T14:31:23"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 9,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "用户管理",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-29T14:30:51"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 13,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "航司信息维护",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-28T15:29:46"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 14,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "机场管理1",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-28T14:59:50"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 15,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "航站楼管理",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-10-31T16:23:05"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 16,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "特殊行李类型维护",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-10-31T14:03:56"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 17,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "公司信息维护",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-04-09T08:43:58"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 18,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "容器维护",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-05-04T14:51:33"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 90,
|
|
|
+ "workId": "999701",
|
|
|
+ "serviceName": "获取节点描述",
|
|
|
+ "serviceType": 1,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": null,
|
|
|
+ "frequencyUnit": null,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": null,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-22T14:45:46"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 205,
|
|
|
+ "workId": "900",
|
|
|
+ "serviceName": "图片入库",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 10,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-20T18:15:42"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 206,
|
|
|
+ "workId": "2001",
|
|
|
+ "serviceName": "采集east_air_bpm",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 10,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 0,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-07-12T08:16:49"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 207,
|
|
|
+ "workId": "2001",
|
|
|
+ "serviceName": "采集chunqiu_bpm_source",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 10,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 0,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-07-12T08:16:49"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 208,
|
|
|
+ "workId": "2001",
|
|
|
+ "serviceName": "采集travelsky_bpm_source",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 10,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 0,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-07-12T08:16:48"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 209,
|
|
|
+ "workId": "2001",
|
|
|
+ "serviceName": "采集bpm_source",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 10,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 0,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-07-12T08:16:49"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 210,
|
|
|
+ "workId": "2001",
|
|
|
+ "serviceName": "采集解析bsm_source",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 10,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-07-17T09:56:24"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 211,
|
|
|
+ "workId": "2001",
|
|
|
+ "serviceName": "采集解析east_air_bsm",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 10,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 0,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-07-12T08:16:49"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 212,
|
|
|
+ "workId": "2001",
|
|
|
+ "serviceName": "采集解析chunqiu_bsm_source",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 10,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 0,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-07-12T08:16:48"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 213,
|
|
|
+ "workId": "2001",
|
|
|
+ "serviceName": "采集解析travelsky_bsm_source",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 10,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 0,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-07-12T08:16:49"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 214,
|
|
|
+ "workId": "500",
|
|
|
+ "serviceName": "BSM报文解析入库",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 8,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-20T18:15:42"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 215,
|
|
|
+ "workId": "500",
|
|
|
+ "serviceName": "BPM报文解析",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 8,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-20T18:15:42"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 216,
|
|
|
+ "workId": "500",
|
|
|
+ "serviceName": "行李日志(PNR)入库",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 8,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-20T18:15:42"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 217,
|
|
|
+ "workId": "500",
|
|
|
+ "serviceName": "行李汇总信息计算入库",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 8,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-20T18:15:42"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "serviceID": 218,
|
|
|
+ "workId": "500",
|
|
|
+ "serviceName": "航班汇总信息计算",
|
|
|
+ "serviceType": 4,
|
|
|
+ "loopCount": null,
|
|
|
+ "frequencyCount": 8,
|
|
|
+ "frequencyUnit": 1,
|
|
|
+ "startTime": null,
|
|
|
+ "stopTime": null,
|
|
|
+ "runState": 1,
|
|
|
+ "taskType": 1,
|
|
|
+ "taskValid": null,
|
|
|
+ "taskInvalid": null,
|
|
|
+ "cronExpress": null,
|
|
|
+ "lastactive": "2023-11-20T18:15:41"
|
|
|
+ }],
|
|
|
+ arrss: [
|
|
|
+ {
|
|
|
+ serviceName: '机器1',
|
|
|
+ runState: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ serviceName: '机器2',
|
|
|
+ runState: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ serviceName: '机器3',
|
|
|
+ runState: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ serviceName: '机器4',
|
|
|
+ runState: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ serviceName: '机器5',
|
|
|
+ runState: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ serviceName: '机器6',
|
|
|
+ runState: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ serviceName: '机器7',
|
|
|
+ runState: true
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ flag: true,
|
|
|
+ rmFlag: false,
|
|
|
+ formInline: {
|
|
|
+ serviceName: '',
|
|
|
+ serviceType: '',
|
|
|
+ workId: '',
|
|
|
+ loopCount: '',
|
|
|
+ frequencyCount: '',
|
|
|
+ frequencyUnit: '',
|
|
|
+ taskValid: '',
|
|
|
+ taskInvalid: '',
|
|
|
+ taskType: '',
|
|
|
+ cronExpress: ''
|
|
|
+ },
|
|
|
+ serviceType: [
|
|
|
+ {
|
|
|
+ label: '接收',
|
|
|
+ value: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '采集',
|
|
|
+ value: 4
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ activeIndex: null,
|
|
|
+ activeIndex1: null,
|
|
|
+ pageIndex: 0,
|
|
|
+ pageSize: 9999,
|
|
|
+ dataContent: {},
|
|
|
+ queryId: '',
|
|
|
+ dataObj: {},
|
|
|
+ dataType: 'edit',
|
|
|
+ noMore: false,
|
|
|
+ loading: false,
|
|
|
+ dataId: 8,
|
|
|
+ msgContent: {},
|
|
|
+ jqList: [],
|
|
|
+ tableColsCopy: [
|
|
|
+ {
|
|
|
+ "queryTemplateColumnSetID": 1980,
|
|
|
+ "serviceOutPutId": 203,
|
|
|
+ "columnName": "library_id",
|
|
|
+ "columnLabel": "名称",
|
|
|
+ "columnDescribe": null,
|
|
|
+ "needSort": null,
|
|
|
+ "needFilters": null,
|
|
|
+ "needShow": 1,
|
|
|
+ "needGroup": null,
|
|
|
+ "dataType": null,
|
|
|
+ "listqueryTemplateID": null,
|
|
|
+ "needCount": null,
|
|
|
+ "orderNumber": null,
|
|
|
+ "columnKey": null,
|
|
|
+ "is_search": null,
|
|
|
+ "default_query_parameters": null,
|
|
|
+ "groupName": null,
|
|
|
+ "nameLength": null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "queryTemplateColumnSetID": 1981,
|
|
|
+ "serviceOutPutId": 203,
|
|
|
+ "columnName": "service_id",
|
|
|
+ "columnLabel": "算法类型",
|
|
|
+ "columnDescribe": null,
|
|
|
+ "needSort": null,
|
|
|
+ "needFilters": null,
|
|
|
+ "needShow": 1,
|
|
|
+ "needGroup": null,
|
|
|
+ "dataType": null,
|
|
|
+ "listqueryTemplateID": null,
|
|
|
+ "needCount": null,
|
|
|
+ "orderNumber": null,
|
|
|
+ "columnKey": null,
|
|
|
+ "is_search": null,
|
|
|
+ "default_query_parameters": null,
|
|
|
+ "groupName": null,
|
|
|
+ "nameLength": null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "queryTemplateColumnSetID": 1982,
|
|
|
+ "serviceOutPutId": 203,
|
|
|
+ "columnName": "library_name",
|
|
|
+ "columnLabel": "数据源",
|
|
|
+ "columnDescribe": null,
|
|
|
+ "needSort": null,
|
|
|
+ "needFilters": null,
|
|
|
+ "needShow": 1,
|
|
|
+ "needGroup": null,
|
|
|
+ "dataType": null,
|
|
|
+ "listqueryTemplateID": null,
|
|
|
+ "needCount": null,
|
|
|
+ "orderNumber": null,
|
|
|
+ "columnKey": null,
|
|
|
+ "is_search": null,
|
|
|
+ "default_query_parameters": null,
|
|
|
+ "groupName": null,
|
|
|
+ "nameLength": null
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ tableData: [{
|
|
|
+ date: '2016-05-02',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路 1518 弄'
|
|
|
+ }, {
|
|
|
+ date: '2016-05-04',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路 1517 弄'
|
|
|
+ }, {
|
|
|
+ date: '2016-05-01',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路 1519 弄'
|
|
|
+ }, {
|
|
|
+ date: '2016-05-03',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路 1516 弄'
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ dataLists () {
|
|
|
+ return this.arrss.filter(data => !this.search || data.serviceName.toLowerCase().includes(this.search.toLowerCase()))
|
|
|
+ },
|
|
|
+ dataList () {
|
|
|
+ return this.arrs.filter(data => !this.search || data.serviceName.toLowerCase().includes(this.search.toLowerCase()))
|
|
|
+ },
|
|
|
+ checkStatus () {
|
|
|
+ return function (formInline) {
|
|
|
+ return (formInline.serviceType && formInline.taskType) || (formInline.serviceType && formInline.taskType == 0) ? false : true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ // const { title, qid } = this.$route.meta
|
|
|
+ // this.title = title
|
|
|
+ // this.queryId = qid
|
|
|
+ // this.getQuery(qid)
|
|
|
+ // this.getMsgList(SERVICE_ID.getJqId)
|
|
|
+ },
|
|
|
+ updated () {
|
|
|
+ this.scrollDown()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async getQuery (id) {
|
|
|
+ try {
|
|
|
+ this.loading = true;
|
|
|
+ const { code, returnData } = await Query({
|
|
|
+ serviceId: id,
|
|
|
+ page: ++this.pageIndex,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ dataContent: this.dataContent,
|
|
|
+ })
|
|
|
+ if (code == 0) {
|
|
|
+ if (returnData.length === 0) {
|
|
|
+ this.pageIndex--;
|
|
|
+ this.noMore = true;
|
|
|
+ }
|
|
|
+ this.arrs.push(...returnData)
|
|
|
+ if (this.dataType == 'add') {
|
|
|
+ const item = this.arrs[this.arrs.length - 1]
|
|
|
+ if (Object.keys(item).length) {
|
|
|
+ this.dataObj = item
|
|
|
+ this.flag = false
|
|
|
+ this.msgContent = {
|
|
|
+ service_id: item.serviceID
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ } else {
|
|
|
+ this.pageIndex--;
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ this.pageIndex--;
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async getMsgList (id) {
|
|
|
+ try {
|
|
|
+ const { code, returnData } = await Query({
|
|
|
+ serviceId: id,
|
|
|
+ page: 1,
|
|
|
+ pageSize: 99,
|
|
|
+ dataContent: {},
|
|
|
+ })
|
|
|
+ if (code == 0) {
|
|
|
+ this.jqList = returnData
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ this.jqList = []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ load () {
|
|
|
+ if (!this.noMore) {
|
|
|
+ this.getQuery(this.queryId);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ scrollDown () {
|
|
|
+ if (this.$refs['scroll'] && this.dataType == 'add') {
|
|
|
+ this.$refs['scroll'].wrap.scrollTop = this.$refs['scroll'].wrap.scrollHeight
|
|
|
+ }
|
|
|
+ },
|
|
|
+ resetTable () {
|
|
|
+ this.pageIndex = 0;
|
|
|
+ this.noMore = false;
|
|
|
+ this.arrs = [];
|
|
|
+ },
|
|
|
+ //服务列表-新增
|
|
|
+ handleAdd () {
|
|
|
+ const datas = this.arrs.filter(item => item.serviceName == '新建服务')
|
|
|
+ if (datas && datas.length) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.dataType = 'add'
|
|
|
+ this.flag = false
|
|
|
+ this.dataObj.serviceName = '新建服务'
|
|
|
+ this.arrs.push({ serviceName: '新建服务' })
|
|
|
+ this.activeIndex = this.arrs.length - 1
|
|
|
+ for (const key in this.formInline) {
|
|
|
+ if (Object.hasOwnProperty.call(this.formInline, key)) {
|
|
|
+ this.formInline[key] = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.msgContent = {
|
|
|
+ service_id: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //服务列表-点击
|
|
|
+ handleClick (item, index) {
|
|
|
+ this.dataType = 'edit'
|
|
|
+ this.dataObj = _.cloneDeep(item)
|
|
|
+ this.formInline = _.cloneDeep(item)
|
|
|
+ this.activeIndex = index
|
|
|
+ this.flag = false
|
|
|
+ this.msgContent = {
|
|
|
+ service_id: item.serviceID
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleClicks (item, index) {
|
|
|
+ this.dataType = 'edit'
|
|
|
+ this.dataObj = _.cloneDeep(item)
|
|
|
+ this.formInline = _.cloneDeep(item)
|
|
|
+ this.activeIndex1 = index
|
|
|
+ this.flag = false
|
|
|
+ this.msgContent = {
|
|
|
+ service_id: item.serviceID
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //服务列表-启用
|
|
|
+ handleStart () {
|
|
|
+ if (this.dataObj.serviceID && this.dataType == 'edit') {
|
|
|
+ this.dataObj.runState = 1
|
|
|
+ this.controlService(1, this.dataObj)
|
|
|
+ } else if (this.dataType == 'add' && this.arrs[this.arrs.length - 1].serviceID) {
|
|
|
+ this.arrs[this.arrs.length - 1].runState = 1
|
|
|
+ this.controlService(1, this.arrs[this.arrs.length - 1])
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error('请先添加当前服务后再操作')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //服务列表-停用
|
|
|
+ handleStop () {
|
|
|
+ if (this.dataObj.serviceID && this.dataType == 'edit') {
|
|
|
+ this.dataObj.runState = 0
|
|
|
+ this.controlService(0, this.dataObj)
|
|
|
+ } else if (this.dataType == 'add' && this.arrs[this.arrs.length - 1].serviceID) {
|
|
|
+ this.arrs[this.arrs.length - 1].runState = 0
|
|
|
+ this.controlService(0, this.arrs[this.arrs.length - 1])
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error('请先添加当前服务后再操作')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //服务列表-重置
|
|
|
+ handleRest (item) {
|
|
|
+ this.controlService(0, item)
|
|
|
+ },
|
|
|
+ //服务列表-保存
|
|
|
+ handleSave () {
|
|
|
+ if (this.dataObj.serviceID && this.dataType == 'edit') {
|
|
|
+ const obj = {}
|
|
|
+ obj.Value = this.formInline
|
|
|
+ obj.filter = {
|
|
|
+ serviceID: this.dataObj.serviceID
|
|
|
+ }
|
|
|
+ if (obj.Value.serviceID) {
|
|
|
+ delete obj.Value.serviceID
|
|
|
+ }
|
|
|
+ this.generalDataReception(2, [obj])
|
|
|
+ } else if (this.dataType == 'add' && this.arrs[this.arrs.length - 1].serviceID) {
|
|
|
+ this.formInline.serviceID = this.arrs[this.arrs.length - 1].serviceID
|
|
|
+ const obj = {}
|
|
|
+ obj.Value = this.formInline
|
|
|
+ obj.filter = [{
|
|
|
+ "left": "(",
|
|
|
+ "column": `serviceID`,
|
|
|
+ "comparator": "=",
|
|
|
+ "value": `${this.formInline.serviceID}`,
|
|
|
+ "right": ")",
|
|
|
+ "connector": "and"
|
|
|
+ }]
|
|
|
+ if (obj.Value.serviceID) {
|
|
|
+ delete obj.Value.serviceID
|
|
|
+ }
|
|
|
+ this.generalDataReception(2, [obj])
|
|
|
+ } else if (this.dataType == 'add') {
|
|
|
+ const obj = {}
|
|
|
+ obj.Value = this.formInline
|
|
|
+ this.generalDataReception(1, [obj])
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error('请先选中服务后再操作')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ tableRemove () {
|
|
|
+ if (this.dataObj.serviceID && this.dataType == 'edit') {
|
|
|
+ // const obj = {}
|
|
|
+ // obj.filter = this.dataObj
|
|
|
+ this.generalDataReception(3, [this.dataObj])
|
|
|
+ this.msgContent = {
|
|
|
+ service_id: ''
|
|
|
+ }
|
|
|
+ this.activeIndex = null;
|
|
|
+ this.dataObj = {};
|
|
|
+ for (const key in this.formInline) {
|
|
|
+ if (Object.hasOwnProperty.call(this.formInline, key)) {
|
|
|
+ this.formInline[key] = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.flag = true
|
|
|
+ } else if (this.dataType == 'add' && this.arrs[this.arrs.length - 1].serviceID) {
|
|
|
+ // const obj = {}
|
|
|
+ // obj.filter = this.arrs[this.arrs.length - 1]
|
|
|
+ this.generalDataReception(3, [this.arrs[this.arrs.length - 1]])
|
|
|
+ this.msgContent = {
|
|
|
+ service_id: ''
|
|
|
+ }
|
|
|
+ this.activeIndex = null;
|
|
|
+ this.dataObj = {};
|
|
|
+ for (const key in this.formInline) {
|
|
|
+ if (Object.hasOwnProperty.call(this.formInline, key)) {
|
|
|
+ this.formInline[key] = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.flag = true
|
|
|
+ this.dataType = 'edit'
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.arrs.splice(this.activeIndex, 1)
|
|
|
+ this.activeIndex = null
|
|
|
+ this.flag = true
|
|
|
+ this.dataObj = {}
|
|
|
+ for (const key in this.formInline) {
|
|
|
+ if (Object.hasOwnProperty.call(this.formInline, key)) {
|
|
|
+ this.formInline[key] = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.rmFlag = false
|
|
|
+ },
|
|
|
+ //服务列表-删除
|
|
|
+ handleError () {
|
|
|
+ this.rmFlag = true
|
|
|
+ },
|
|
|
+ //服务列表-增/删/改
|
|
|
+ async generalDataReception (event, data) {
|
|
|
+ try {
|
|
|
+ const params = {
|
|
|
+ serviceId: this.queryId,
|
|
|
+ dataContent: data,
|
|
|
+ event: `${event}`,
|
|
|
+ };
|
|
|
+ const { code } =
|
|
|
+ event == 1
|
|
|
+ ? await newData(params)
|
|
|
+ : event == 2
|
|
|
+ ? await modifyData(params)
|
|
|
+ : await moveData(params);
|
|
|
+ if (code == 0) {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.resetTable();
|
|
|
+ this.getQuery(this.queryId);
|
|
|
+ } else {
|
|
|
+ this.$message.error("操作失败");
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error("操作失败");
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ //服务启停
|
|
|
+ async controlService (event, data) {
|
|
|
+ try {
|
|
|
+ const params = {
|
|
|
+ serviceId: data.serviceID
|
|
|
+ };
|
|
|
+ const { code } =
|
|
|
+ event == 1
|
|
|
+ ? await start(params)
|
|
|
+ : await stop(params);
|
|
|
+ if (code == 0) {
|
|
|
+ this.resetTable()
|
|
|
+ this.getQuery(this.queryId)
|
|
|
+ this.$message.success("操作成功")
|
|
|
+ // const obj = {}
|
|
|
+ // obj.Value = data
|
|
|
+ // obj.filter = {
|
|
|
+ // serviceID: data.serviceID
|
|
|
+ // }
|
|
|
+ // if (obj.Value.serviceID) {
|
|
|
+ // delete obj.Value.serviceID
|
|
|
+ // }
|
|
|
+ // this.generalDataReception(2, [obj])
|
|
|
+ } else {
|
|
|
+ this.$message.error("操作失败");
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error("操作失败");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+@import "./css/index.scss";
|
|
|
+</style>
|