|
@@ -74,7 +74,7 @@
|
|
|
<el-input clearable v-model="formInline.serviceURL" :disabled="activeIndex == null" size="small" placeholder="请输入IP及端口"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="部署位置">
|
|
|
- <el-input clearable v-model="formInline.serviceName" :disabled="activeIndex == null" size="small" placeholder="请输入部署位置"></el-input>
|
|
|
+ <el-input clearable v-model="formInline.filepath" :disabled="activeIndex == null" size="small" placeholder="请输入部署位置"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -103,16 +103,9 @@ export default {
|
|
|
arrs: [],
|
|
|
flag: true,
|
|
|
formInline: {
|
|
|
- serviceName: '',
|
|
|
- serviceType: '',
|
|
|
- workId: '',
|
|
|
- loopCount: '',
|
|
|
- frequencyCount: '',
|
|
|
- frequencyUnit: '',
|
|
|
- taskValid: '',
|
|
|
- taskInvalid: '',
|
|
|
- taskType: '',
|
|
|
- cronExpress: ''
|
|
|
+ deployNodeName: '',
|
|
|
+ serviceURL: '',
|
|
|
+ filepath: ''
|
|
|
},
|
|
|
serviceType: [
|
|
|
{
|
|
@@ -271,14 +264,35 @@ export default {
|
|
|
this.controlService(0, item)
|
|
|
},
|
|
|
//服务列表-保存
|
|
|
- handleSave () {
|
|
|
+ async handleSave () {
|
|
|
if (this.dataObj.deployNodeID && this.dataType == 'edit') {
|
|
|
- this.generalDataReception(2, this.formInline)
|
|
|
+ const code = await this.getChangeList(this.queryId, this.formInline, 2, 'deployNodeID')
|
|
|
+ if (code) {
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.resetTable()
|
|
|
+ this.getQuery(this.queryId)
|
|
|
+ } else {
|
|
|
+ this.$message.success('操作失败')
|
|
|
+ }
|
|
|
} else if (this.dataType == 'add' && this.arrs[this.arrs.length - 1].deployNodeID) {
|
|
|
this.formInline.deployNodeID = this.arrs[this.arrs.length - 1].deployNodeID
|
|
|
- this.generalDataReception(2, this.formInline)
|
|
|
+ const code = await this.getChangeList(this.queryId, this.formInline, 2, 'deployNodeID')
|
|
|
+ if (code) {
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.resetTable()
|
|
|
+ this.getQuery(this.queryId)
|
|
|
+ } else {
|
|
|
+ this.$message.success('操作失败')
|
|
|
+ }
|
|
|
} else if (this.dataType == 'add') {
|
|
|
- this.generalDataReception(1, this.formInline)
|
|
|
+ const code = await this.getChangeList(this.queryId, this.formInline, 1)
|
|
|
+ if (code) {
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.resetTable()
|
|
|
+ this.getQuery(this.queryId)
|
|
|
+ } else {
|
|
|
+ this.$message.success('操作失败')
|
|
|
+ }
|
|
|
}
|
|
|
else {
|
|
|
this.$message.error('请先选中服务后再操作')
|
|
@@ -291,8 +305,15 @@ export default {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- this.generalDataReception(3, this.dataObj)
|
|
|
+ }).then(async () => {
|
|
|
+ const code = await this.getChangeList(this.queryId, this.dataObj, 3)
|
|
|
+ if (code) {
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.resetTable()
|
|
|
+ this.getQuery(this.queryId)
|
|
|
+ } else {
|
|
|
+ this.$message.success('操作失败')
|
|
|
+ }
|
|
|
this.msgContent = {}
|
|
|
this.activeIndex = null;
|
|
|
this.dataObj = {};
|
|
@@ -313,8 +334,15 @@ export default {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- this.generalDataReception(3, this.arrs[this.arrs.length - 1])
|
|
|
+ }).then(async () => {
|
|
|
+ const code = await this.getChangeList(this.queryId, this.arrs[this.arrs.length - 1], 3)
|
|
|
+ if (code) {
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.resetTable()
|
|
|
+ this.getQuery(this.queryId)
|
|
|
+ } else {
|
|
|
+ this.$message.success('操作失败')
|
|
|
+ }
|
|
|
this.msgContent = {
|
|
|
service_id: ''
|
|
|
}
|
|
@@ -378,7 +406,10 @@ export default {
|
|
|
? await start(params)
|
|
|
: await stop(params);
|
|
|
if (code == 0) {
|
|
|
- this.generalDataReception(2, data)
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.resetTable()
|
|
|
+ this.getQuery(this.queryId)
|
|
|
+ // this.generalDataReception(2, data)
|
|
|
} else {
|
|
|
this.$message.error("操作失败");
|
|
|
}
|