|
@@ -9,134 +9,61 @@
|
|
|
<template>
|
|
|
<div class="service-edit">
|
|
|
<div class="scrollbar">
|
|
|
- <div
|
|
|
- ref="formWrap"
|
|
|
- class="service-form-wrapper service-edit-wrapper"
|
|
|
- >
|
|
|
+ <div ref="formWrap" class="service-form-wrapper service-edit-wrapper">
|
|
|
<header class="title">
|
|
|
<p class="manageTitle">服务</p>
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- class="btn-save"
|
|
|
- @click="editSubmitHandler"
|
|
|
- >保存</el-button>
|
|
|
+ <el-button size="small" type="primary" class="btn-save" @click="editSubmitHandler">保存</el-button>
|
|
|
</header>
|
|
|
<main class="content">
|
|
|
- <el-form
|
|
|
- ref="serviceForm"
|
|
|
- class="service-form"
|
|
|
- :model="serviceForm"
|
|
|
- label-position="right"
|
|
|
- label-width="72px"
|
|
|
- size="mini"
|
|
|
- >
|
|
|
- <el-row
|
|
|
- :gutter="60"
|
|
|
- type="flex"
|
|
|
- >
|
|
|
+ <el-form ref="serviceForm" class="service-form" :model="serviceForm" label-position="right" label-width="72px" size="mini">
|
|
|
+ <el-row :gutter="60" type="flex">
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item
|
|
|
- label="服务名称"
|
|
|
- prop="serviceName"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="serviceForm.serviceName"
|
|
|
- placeholder="请输入服务名称"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <el-form-item label="服务名称" prop="serviceName">
|
|
|
+ <el-input v-model="serviceForm.serviceName" placeholder="请输入服务名称" clearable />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-form-item
|
|
|
- label="类型"
|
|
|
- prop="serviceType"
|
|
|
- label-width="44px"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-model="serviceForm.serviceType"
|
|
|
- clearable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- :value="1"
|
|
|
- label="管理前端"
|
|
|
- />
|
|
|
- <el-option
|
|
|
- :value="2"
|
|
|
- label="管理后端"
|
|
|
- />
|
|
|
- <el-option
|
|
|
- :value="3"
|
|
|
- label="业务前端"
|
|
|
- />
|
|
|
- <el-option
|
|
|
- :value="4"
|
|
|
- label="业务后端"
|
|
|
- />
|
|
|
+ <el-form-item label="类型" prop="serviceType" label-width="44px">
|
|
|
+ <el-select v-model="serviceForm.serviceType" clearable>
|
|
|
+ <el-option :value="1" label="管理前端" />
|
|
|
+ <el-option :value="2" label="管理后端" />
|
|
|
+ <el-option :value="3" label="业务前端" />
|
|
|
+ <el-option :value="4" label="业务后端" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item
|
|
|
- label="数据来源"
|
|
|
- prop="dataSourceID"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-model="serviceForm.dataSourceID"
|
|
|
- clearable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="dataSource in dataSourceList"
|
|
|
- :key="dataSource.dataSourceID"
|
|
|
- :value="dataSource.dataSourceID"
|
|
|
- :label="dataSource.dataSourceName"
|
|
|
- />
|
|
|
+ <div class="flex-wrap">
|
|
|
+ <el-form-item label="数据来源" prop="dataSourceID">
|
|
|
+ <el-select v-model="serviceForm.dataSourceID" clearable>
|
|
|
+ <el-option v-for="dataSource in dataSourceList" :key="dataSource.dataSourceID" :value="dataSource.dataSourceID" :label="dataSource.dataSourceName" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-button style="height:28px;line-height: 0px;margin-left:16px;" size="small" @click="addService" type="primary">新增</el-button>
|
|
|
+ </div>
|
|
|
+ <!-- <el-form-item label="数据来源" prop="dataSourceID">
|
|
|
+ <el-select v-model="serviceForm.dataSourceID" clearable>
|
|
|
+ <el-option v-for="dataSource in dataSourceList" :key="dataSource.dataSourceID" :value="dataSource.dataSourceID" :label="dataSource.dataSourceName" />
|
|
|
</el-select>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item
|
|
|
- label="生命周期ID键名"
|
|
|
- prop="lifeCycleCol"
|
|
|
- label-width="114px"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="serviceForm.lifeCycleCol"
|
|
|
- placeholder="请输入生命周期ID键名"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <el-form-item label="生命周期ID键名" prop="lifeCycleCol" label-width="114px">
|
|
|
+ <el-input v-model="serviceForm.lifeCycleCol" placeholder="请输入生命周期ID键名" clearable />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item
|
|
|
- label="服务描述"
|
|
|
- prop="serviceDescribe"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="serviceForm.serviceDescribe"
|
|
|
- placeholder="请输入描述"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <el-form-item label="服务描述" prop="serviceDescribe">
|
|
|
+ <el-input v-model="serviceForm.serviceDescribe" placeholder="请输入描述" clearable />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-form-item
|
|
|
- label="采集线程"
|
|
|
- prop="threads"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="serviceForm.threads"
|
|
|
- type="number"
|
|
|
- placeholder="请输入采集线程数"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <el-form-item label="采集线程" prop="threads">
|
|
|
+ <el-input v-model="serviceForm.threads" type="number" placeholder="请输入采集线程数" clearable />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item
|
|
|
- label="是否异步"
|
|
|
- prop="isAsynchronous"
|
|
|
- >
|
|
|
+ <el-form-item label="是否异步" prop="isAsynchronous">
|
|
|
<el-radio-group v-model="serviceForm.isAsynchronous">
|
|
|
<el-radio :label="0">是</el-radio>
|
|
|
<el-radio :label="1">否</el-radio>
|
|
@@ -144,157 +71,57 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item
|
|
|
- label="数据类型"
|
|
|
- prop="datatype"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-model="serviceForm.datatype"
|
|
|
- clearable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- label="JSON"
|
|
|
- :value="1"
|
|
|
- />
|
|
|
- <el-option
|
|
|
- label="XML"
|
|
|
- :value="2"
|
|
|
- />
|
|
|
- <el-option
|
|
|
- label="自定义"
|
|
|
- :value="3"
|
|
|
- />
|
|
|
+ <el-form-item label="数据类型" prop="datatype">
|
|
|
+ <el-select v-model="serviceForm.datatype" clearable>
|
|
|
+ <el-option label="JSON" :value="1" />
|
|
|
+ <el-option label="XML" :value="2" />
|
|
|
+ <el-option label="自定义" :value="3" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item
|
|
|
- label="取值规则"
|
|
|
- prop="computingMethod"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="serviceForm.computingMethod"
|
|
|
- placeholder="请输入取值规则"
|
|
|
- type="textarea"
|
|
|
- :autosize="{ minRows: 4, maxRows: 4 }"
|
|
|
- resize="none"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <el-form-item label="取值规则" prop="computingMethod">
|
|
|
+ <el-input v-model="serviceForm.computingMethod" placeholder="请输入取值规则" type="textarea" :autosize="{ minRows: 4, maxRows: 4 }" resize="none" clearable />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item
|
|
|
- label="检测规则"
|
|
|
- prop="validationExpression"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="serviceForm.validationExpression"
|
|
|
- placeholder="请输入检测规则"
|
|
|
- type="textarea"
|
|
|
- :autosize="{ minRows: 4, maxRows: 4 }"
|
|
|
- resize="none"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <el-form-item label="检测规则" prop="validationExpression">
|
|
|
+ <el-input v-model="serviceForm.validationExpression" placeholder="请输入检测规则" type="textarea" :autosize="{ minRows: 4, maxRows: 4 }" resize="none" clearable />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-form-item
|
|
|
- label="启动时间"
|
|
|
- prop="startTime"
|
|
|
- >
|
|
|
- <el-date-picker
|
|
|
- v-model="serviceForm.startTime"
|
|
|
- type="datetime"
|
|
|
- format="yyyy-MM-dd HH:mm"
|
|
|
- value-format="yyyy-MM-dd HH:mm"
|
|
|
- placeholder="请选择启动时间"
|
|
|
- />
|
|
|
+ <el-form-item label="启动时间" prop="startTime">
|
|
|
+ <el-date-picker v-model="serviceForm.startTime" type="datetime" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" placeholder="请选择启动时间" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-form-item
|
|
|
- label="停止时间"
|
|
|
- prop="stopTime"
|
|
|
- >
|
|
|
- <el-date-picker
|
|
|
- v-model="serviceForm.stopTime"
|
|
|
- type="datetime"
|
|
|
- format="yyyy-MM-dd HH:mm"
|
|
|
- value-format="yyyy-MM-dd HH:mm"
|
|
|
- placeholder="请选择停止时间"
|
|
|
- />
|
|
|
+ <el-form-item label="停止时间" prop="stopTime">
|
|
|
+ <el-date-picker v-model="serviceForm.stopTime" type="datetime" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" placeholder="请选择停止时间" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-form-item
|
|
|
- label="失败重试次数"
|
|
|
- prop="retryCount"
|
|
|
- label-width="100px"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="serviceForm.retryCount"
|
|
|
- type="number"
|
|
|
- placeholder="请输入重试次数"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <el-form-item label="失败重试次数" prop="retryCount" label-width="100px">
|
|
|
+ <el-input v-model="serviceForm.retryCount" type="number" placeholder="请输入重试次数" clearable />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-form-item
|
|
|
- label="循环次数"
|
|
|
- prop="loopCount"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="serviceForm.loopCount"
|
|
|
- type="number"
|
|
|
- placeholder="请输入循环次数"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <el-form-item label="循环次数" prop="loopCount">
|
|
|
+ <el-input v-model="serviceForm.loopCount" type="number" placeholder="请输入循环次数" clearable />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-form-item
|
|
|
- label="循环频率"
|
|
|
- prop="frequencyCount"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="serviceForm.frequencyCount"
|
|
|
- type="number"
|
|
|
- placeholder="请输入循环频率"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <el-form-item label="循环频率" prop="frequencyCount">
|
|
|
+ <el-input v-model="serviceForm.frequencyCount" type="number" placeholder="请输入循环频率" clearable />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-form-item
|
|
|
- label="循环频率单位"
|
|
|
- prop="frequencyUnit"
|
|
|
- label-width="100px"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-model="serviceForm.frequencyUnit"
|
|
|
- clearable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- label="天"
|
|
|
- :value="24 * 60 * 60 * 1000"
|
|
|
- />
|
|
|
- <el-option
|
|
|
- label="小时"
|
|
|
- :value="60 * 60 * 1000"
|
|
|
- />
|
|
|
- <el-option
|
|
|
- label="分钟"
|
|
|
- :value="60 * 1000"
|
|
|
- />
|
|
|
- <el-option
|
|
|
- label="秒"
|
|
|
- :value="1000"
|
|
|
- />
|
|
|
- <el-option
|
|
|
- label="毫秒"
|
|
|
- :value="1"
|
|
|
- />
|
|
|
+ <el-form-item label="循环频率单位" prop="frequencyUnit" label-width="100px">
|
|
|
+ <el-select v-model="serviceForm.frequencyUnit" clearable>
|
|
|
+ <el-option label="天" :value="24 * 60 * 60 * 1000" />
|
|
|
+ <el-option label="小时" :value="60 * 60 * 1000" />
|
|
|
+ <el-option label="分钟" :value="60 * 1000" />
|
|
|
+ <el-option label="秒" :value="1000" />
|
|
|
+ <el-option label="毫秒" :value="1" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -306,61 +133,55 @@
|
|
|
<div class="service-table-wrapper service-edit-wrapper">
|
|
|
<header class="title">
|
|
|
<p class="manageTitle">输出</p>
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- class="btn-white"
|
|
|
- @click="btnAddClickHandler(1)"
|
|
|
- >新增</el-button>
|
|
|
+ <el-button size="small" type="primary" class="btn-white" @click="btnAddClickHandler(1)">新增</el-button>
|
|
|
</header>
|
|
|
<main class="content">
|
|
|
- <DataTable
|
|
|
- ref="serviceOutputTable"
|
|
|
- data-id="7"
|
|
|
- :data-content="{ serviceID: serviceID }"
|
|
|
- :rows="12"
|
|
|
- :table-height="computedTableHeight"
|
|
|
- margin-top="0"
|
|
|
- :is-btn="false"
|
|
|
- :is-dialog="true"
|
|
|
- />
|
|
|
+ <DataTable ref="serviceOutputTable" data-id="7" :data-content="{ serviceID: serviceID }" :rows="12" :table-height="computedTableHeight" margin-top="0" :is-btn="false" :is-dialog="true" />
|
|
|
</main>
|
|
|
</div>
|
|
|
<div class="service-table-wrapper service-edit-wrapper">
|
|
|
<header class="title">
|
|
|
<p class="manageTitle">部署机器</p>
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- class="btn-white"
|
|
|
- @click="btnAddClickHandler(2)"
|
|
|
- >新增</el-button>
|
|
|
+ <el-button size="small" type="primary" class="btn-white" @click="btnAddClickHandler(2)">新增</el-button>
|
|
|
</header>
|
|
|
<main class="content">
|
|
|
- <DataTable
|
|
|
- ref="serviceMachineTable"
|
|
|
- data-id="3"
|
|
|
- :data-content="{ serviceID: serviceID }"
|
|
|
- :rows="12"
|
|
|
- :table-height="computedTableHeight"
|
|
|
- margin-top="0"
|
|
|
- :is-btn="false"
|
|
|
- :is-dialog="true"
|
|
|
- :selection-enable="true"
|
|
|
- @selection-change="machineSelectionChangeHandler"
|
|
|
- />
|
|
|
+ <DataTable ref="serviceMachineTable" data-id="3" :data-content="{ serviceID: serviceID }" :rows="12" :table-height="computedTableHeight" margin-top="0" :is-btn="false" :is-dialog="true" :selection-enable="true" @selection-change="machineSelectionChangeHandler" />
|
|
|
</main>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <Dialog :flag="sourceFormVisible" width="464px">
|
|
|
+ <div class="dialog-create">
|
|
|
+ <div class="title">新增数据来源</div>
|
|
|
+ <div class="content">
|
|
|
+ <el-form ref="sourceForm" label-width="100px" :model="formLabelAlign">
|
|
|
+ <el-form-item label="数据源名称">
|
|
|
+ <el-input size="small" v-model="formLabelAlign.dataSourceName"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="协议名称">
|
|
|
+ <el-select size="small" style="width:100%;" v-model="formLabelAlign.protocolName" placeholder="请选择活动区域">
|
|
|
+ <el-option v-for="item in sourceDatas" :key="item.protocolID" :label="item.protocolName" :value="item.protocolID"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="连接参数">
|
|
|
+ <el-input size="small" type="textarea" rows="3" v-model="formLabelAlign.connectConfig"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div class="foot">
|
|
|
+ <el-button size="medium" type="primary" @click="formService" class="r25 r26">提交</el-button>
|
|
|
+ <el-button size="medium" class="r26" @click="sourceFormVisible = false">取消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
// import NoData from '@/components/nodata'
|
|
|
-// import Dialog from '@/layout/components/Dialog'
|
|
|
+import Dialog from '@/layout/components/Dialog'
|
|
|
import DataTable from '@/components/Table'
|
|
|
-import { myQuery } from '@/api/dataIntegration'
|
|
|
+import { myQuery, GeneralDataReception } from '@/api/dataIntegration'
|
|
|
|
|
|
// import query from './mixins/query'
|
|
|
import operate from './mixins/operate'
|
|
@@ -368,19 +189,20 @@ import operate from './mixins/operate'
|
|
|
export default {
|
|
|
components: {
|
|
|
// NoData,
|
|
|
- // Dialog,
|
|
|
+ Dialog,
|
|
|
DataTable
|
|
|
},
|
|
|
mixins: [
|
|
|
// query,
|
|
|
operate
|
|
|
],
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
serviceID: Number(this.$route.query.serviceID),
|
|
|
operateDialogType: null,
|
|
|
delObj: {},
|
|
|
deleteDialogType: null,
|
|
|
+ sourceFormVisible: false,
|
|
|
tempCheckedKeys: [],
|
|
|
serviceForm: {
|
|
|
serviceName: '',
|
|
@@ -411,14 +233,20 @@ export default {
|
|
|
serviceAndSourceList: [],
|
|
|
processList: [],
|
|
|
checkedProcessKeys: [],
|
|
|
- outputList: []
|
|
|
+ outputList: [],
|
|
|
+ formLabelAlign: {
|
|
|
+ dataSourceName: '',
|
|
|
+ protocolName: '',
|
|
|
+ connectConfig: ''
|
|
|
+ },
|
|
|
+ sourceDatas: [],
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ mounted () {
|
|
|
this.queryServiceByID(this.serviceID)
|
|
|
- this.getDataSourceList()
|
|
|
+ this.getDataSourceList(21)
|
|
|
},
|
|
|
- updated() {
|
|
|
+ updated () {
|
|
|
const headerHeight = 80 + 24
|
|
|
const bottomBlankHeight = 16
|
|
|
const formWrapHeight = this.$refs['formWrap'].offsetHeight
|
|
@@ -427,14 +255,14 @@ export default {
|
|
|
this.computedTableHeight = `calc(100vh - ${headerHeight + formWrapHeight + bottomBlankHeight + tableWrapHeaderHeight + tableWrapPadding}px)`
|
|
|
},
|
|
|
methods: {
|
|
|
- editSubmitHandler() {
|
|
|
+ editSubmitHandler () {
|
|
|
this.$refs['serviceForm'].validate(valid => {
|
|
|
if (valid) {
|
|
|
this.updateService()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- btnAddClickHandler(flag) {
|
|
|
+ btnAddClickHandler (flag) {
|
|
|
switch (flag) {
|
|
|
case 1:
|
|
|
this.$refs['serviceOutputTable'].handleAdd()
|
|
@@ -446,7 +274,11 @@ export default {
|
|
|
break
|
|
|
}
|
|
|
},
|
|
|
- async machineSelectionChangeHandler(selection, row) {
|
|
|
+ addService () {
|
|
|
+ this.getDataSourceList(23)
|
|
|
+ this.sourceFormVisible = true
|
|
|
+ },
|
|
|
+ async machineSelectionChangeHandler (selection, row) {
|
|
|
const isSelected = selection.findIndex(item => item.deployNodeID === row.deployNodeID) > -1
|
|
|
const event = isSelected ? 1 : 3
|
|
|
try {
|
|
@@ -457,15 +289,23 @@ export default {
|
|
|
this.$refs['serviceMachineTable'].toggleRowSelection(row, !isSelected)
|
|
|
}
|
|
|
},
|
|
|
- async getDataSourceList() {
|
|
|
- const dataSourceList = await this.getSelectOption(21)
|
|
|
- this.dataSourceList = dataSourceList.map(item => {
|
|
|
- item[item.setlabel] = item.k
|
|
|
- item[item.setvalue] = item.v
|
|
|
- return item
|
|
|
- })
|
|
|
+ async getDataSourceList (id) {
|
|
|
+ const dataSourceList = await this.getSelectOption(id)
|
|
|
+ if (id == 21) {
|
|
|
+ this.dataSourceList = dataSourceList.map(item => {
|
|
|
+ item[item.setlabel] = item.k
|
|
|
+ item[item.setvalue] = item.v
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.sourceDatas = dataSourceList.map(item => {
|
|
|
+ item[item.setlabel] = item.k
|
|
|
+ item[item.setvalue] = item.v
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
- async getSelectOption(ID) {
|
|
|
+ async getSelectOption (ID) {
|
|
|
try {
|
|
|
const { listValues } = await myQuery(ID)
|
|
|
return listValues
|
|
@@ -474,12 +314,36 @@ export default {
|
|
|
return []
|
|
|
}
|
|
|
},
|
|
|
- async queryServiceByID(serviceID) {
|
|
|
+ async queryServiceByID (serviceID) {
|
|
|
const serviceInfo = await myQuery(39, serviceID)
|
|
|
Object.entries(serviceInfo.listValues[0]).forEach(([key, value]) => {
|
|
|
this.serviceForm[key] = value
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ async formService () {
|
|
|
+ this.sourceDatas.forEach(item => {
|
|
|
+ if (item.protocolID == this.formLabelAlign.protocolName) {
|
|
|
+ this.formLabelAlign.protocolName = item.protocolName
|
|
|
+ this.formLabelAlign.protocolID = item.protocolID
|
|
|
+ }
|
|
|
+ })
|
|
|
+ try {
|
|
|
+ this.formLabelAlign['event'] = 1
|
|
|
+ const res = await GeneralDataReception({
|
|
|
+ serviceId: 12,
|
|
|
+ dataContent: JSON.stringify(this.formLabelAlign)
|
|
|
+ })
|
|
|
+ if (Number(res.code) === 0) {
|
|
|
+ this.$message.success(res.message ?? '成功')
|
|
|
+ this.sourceFormVisible = false
|
|
|
+ this.getDataSourceList(21)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message ?? '失败')
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.log('错误', error)
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -567,7 +431,7 @@ export default {
|
|
|
&::-webkit-inner-spin-button {
|
|
|
-webkit-appearance: none !important;
|
|
|
}
|
|
|
- &[type='number'] {
|
|
|
+ &[type="number"] {
|
|
|
-moz-appearance: textfield !important;
|
|
|
}
|
|
|
}
|