From f94ded5d0a6545bb564f986bc2db03a989fae662 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 12 三月 2024 10:17:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/views/docking/infoForm.vue | 435 ++++++++++++++++++++++++++++++++++--------------------
1 files changed, 272 insertions(+), 163 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/docking/infoForm.vue b/Source/UBCS-WEB/src/views/docking/infoForm.vue
index a40ebb4..589f402 100644
--- a/Source/UBCS-WEB/src/views/docking/infoForm.vue
+++ b/Source/UBCS-WEB/src/views/docking/infoForm.vue
@@ -1,16 +1,18 @@
<template>
<el-container>
- <el-dialog title="绯荤粺闆嗘垚鍩虹淇℃伅" v-dialogDrag :visible.sync="showSubmitDialog" class="avue-dialog avue-dialog--top" append-to-body @close="closeSubmitDialog" width="1000px"
- style="height: 110vh;" top="-5%">
- <el-form ref="form" :model="formData" show-message="true" inline size="medium" label-suffix=":"
- class="dockingForm" :rules="rules" status-icon="true">
+ <el-dialog v-dialogDrag :visible.sync="showSubmitDialog" append-to-body class="avue-dialog avue-dialog--top"
+ style="height: 110vh;" title="绯荤粺闆嗘垚鍩虹淇℃伅" top="-5%"
+ width="1000px" @close="closeSubmitDialog">
+ <el-form ref="form" :model="formData" :rules="rules" class="dockingForm" inline label-suffix=":"
+ show-message="true" size="medium" status-icon="true">
<el-form-item label="鎺ュ彛绫诲瀷" prop="dataFlowType">
- <el-select v-model="formData.dataFlowType" placeholder="璇烽�夋嫨" @change="dataFlowTypeChange">
+ <el-select v-model="formData.dataFlowType" :disabled="formData.type == 'edit'" placeholder="璇烽�夋嫨"
+ @change="dataFlowTypeChange">
<el-option v-for="item in dataFlowTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
- <el-form-item :label="formData.dataFlowType=='push'?'鎺ㄩ�佺被鍨�':'鎺ュ彈绫诲瀷'" prop="pushType">
+ <el-form-item :label="formData.dataFlowType=='push'?'鎺ㄩ�佺被鍨�':'鎺ユ敹绫诲瀷'" prop="pushType">
<el-select v-model="formData.pushType" placeholder="璇烽�夋嫨" @change="pushTypeChange">
<el-option v-for="item in pushTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
@@ -28,9 +30,18 @@
</el-option>
</el-select>
</el-form-item>
- <div v-if="formData.pushType !='5' && formData.pushType !='6'">
- <el-form-item label="鍒嗙被閫夋嫨" prop="classifyName">
+ <el-form-item label="鍐呭绫诲瀷" prop="contentType">
+ <el-select v-model="formData.contentType" placeholder="璇烽�夋嫨">
+ <el-option v-for="item in contentTypeList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-divider></el-divider>
+ <div v-if="formData.dataFlowType=='push'">
+ <el-form-item label="鍒嗙被閫夋嫨" prop="classifyName">
<vciWebRefer
+ key="classifyName" :disabled="false"
+ :display="true"
:referConfig="{
title: '鍒嗙被閫夋嫨',
showField: 'classifyName',
@@ -39,15 +50,16 @@
placeholder: '璇烽�夋嫨鍒嗙被閫夋嫨',
options: {isMuti: false, type: 'tree', url: 'api/ubcs-code/codeClassify/treeCodeClassify'},
}"
- :value="formData.classifyOid"
:text="formData.classifyName"
- :disabled="false"
- :display="true"
+ :value="formData.classifyOid"
+ data-key="classifyName"
@setReferValue="setReferValue"
></vciWebRefer>
</el-form-item>
<el-form-item label="闆嗘垚绯荤粺" prop="targetSystemName">
<vciWebRefer
+ key="targetSystemName" :disabled="false"
+ :display="true"
:referConfig="{
title: '闆嗘垚绯荤粺',
showField: 'targetSystemName',
@@ -56,55 +68,62 @@
placeholder: '璇烽�夋嫨',
options: {isMuti: false, type: 'default', url: 'api/ubcs-code/dockingManagement/gridDockingSystem'},
}"
- :value="formData.targetSystemOid"
:text="formData.targetSystemName"
- :disabled="false"
- :display="true"
+ :value="formData.targetSystemOid"
+ data-key="targetSystemName"
@setReferValue="setReferValue"
></vciWebRefer>
</el-form-item>
</div>
<div v-else>
- <el-form-item label="鍒嗙被閫夋嫨" prop="classifyName" style="display: none">
+ <!-- <el-form-item label="鍒嗙被閫夋嫨" prop="classifyName" style="display: none">-->
+ <!-- </el-form-item>-->
+ <el-form-item v-if="formData.pushType !='5' && formData.pushType !='6'" label="鍒嗙被閫夋嫨" prop="classifyName">
+ <vciWebRefer
+ key="classifyName" :disabled="false"
+ :display="true"
+ :referConfig="{
+ title: '鍒嗙被閫夋嫨',
+ showField: 'classifyName',
+ field: 'classifyOid',
+ fieldMap:{'classifyId':'id'},
+ placeholder: '璇烽�夋嫨鍒嗙被閫夋嫨',
+ options: {isMuti: false, type: 'tree', url: 'api/ubcs-code/codeClassify/treeCodeClassify'},
+ }"
+ :text="formData.classifyName"
+ :value="formData.classifyOid"
+ data-key="classifyName"
+ @setReferValue="setReferValue"
+ ></vciWebRefer>
</el-form-item>
<el-form-item label="闆嗘垚绯荤粺" prop="sourceSystemName">
<vciWebRefer
+ key="sourceSystemName" :disabled="false"
+ :display="true"
:referConfig="{
title: '闆嗘垚绯荤粺',
showField: 'sourceSystemName',
field: 'sourceSystemOid',
fieldMap:{'sourceSystemId':'id'},
placeholder: '璇烽�夋嫨',
- options: {isMuti: false, type: 'default', url: 'api/ubcs-code/dockingManagement/gridDockingSystem'},
+ options: {isMuti: false, type: 'default', url: referUrl},
}"
- :value="formData.sourceSystemOid"
:text="formData.sourceSystemName"
- :disabled="false"
- :display="true"
+ :value="formData.sourceSystemOid"
+ data-key="sourceSystemName"
@setReferValue="setReferValue"
></vciWebRefer>
</el-form-item>
+ <el-form-item label="鎺ュ彛鏂瑰紡" prop="interfaceType">
+ <el-select v-model="formData.interfaceType" clearable placeholder="璇烽�夋嫨">
+ <el-option v-for="item in interfaceTypeList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
</div>
- <el-form-item label="鎺ュ彛鏂瑰紡" prop="interfaceType">
- <el-select v-model="formData.interfaceType" clearable placeholder="璇烽�夋嫨">
- <el-option v-for="item in interfaceTypeList" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item v-if="formData.pushType=='1'" label="鏄惁鎺ㄩ�侀泦鍥㈢爜" prop="isGroupCodeFlag">
- <el-switch v-model="formData.isGroupCodeFlag" ></el-switch>
- </el-form-item>
- <el-form-item v-if="formData.pushType=='3'" label="鏄惁鐢宠闆嗗洟鐮�" prop="isGroupCodeFlag">
- <el-switch v-model="formData.isGroupCodeFlag" ></el-switch>
- </el-form-item>
- <el-form-item v-if="formData.pushType=='4'" label="鏄惁缁存姢闆嗗洟鐮�" prop="isGroupCodeFlag">
- <el-switch v-model="formData.isGroupCodeFlag" ></el-switch>
- </el-form-item>
- <el-form-item v-if="formData.pushType=='7'" label="鏄惁鏌ヨ闆嗗洟鐮�" prop="isGroupCodeFlag">
- <el-switch v-model="formData.isGroupCodeFlag" ></el-switch>
- </el-form-item>
- <el-form-item label="绯荤粺鎻忚堪" style="width: 850px;" prop="description">
- <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 5}" v-model="formData.description" style="width: 740px;"></el-input>
+ <el-form-item label="绯荤粺鎻忚堪" prop="description" style="width: 850px;">
+ <el-input v-model="formData.description" :autosize="{ minRows: 2, maxRows: 5}" style="width: 740px;"
+ type="textarea"></el-input>
</el-form-item>
<el-form-item v-if="formData.interfaceType=='http'" label="璇锋眰鏂瑰紡" prop="requestMethod">
<el-select v-model="formData.requestMethod" placeholder="璇烽�夋嫨">
@@ -112,7 +131,8 @@
</el-option>
</el-select>
</el-form-item>
- <el-form-item v-if="formData.interfaceType=='webService' || formData.interfaceType=='http'" label="璇锋眰鍦板潃" prop="requestUrl">
+ <el-form-item v-if="formData.interfaceType=='webService' || formData.interfaceType=='http'" label="璇锋眰鍦板潃"
+ prop="requestUrl">
<el-input v-model="formData.requestUrl" type="text"></el-input>
</el-form-item>
<el-form-item v-if="formData.interfaceType=='webService'" label="鎺ュ彛鍑芥暟" prop="interfaceFunction">
@@ -122,61 +142,70 @@
<el-input v-model="formData.nameSpace"></el-input>
</el-form-item>
<el-form-item v-if="formData.interfaceType=='webService'" label="soapAction" prop="soapAction">
- <el-input v-model="formData.soapAction" ></el-input>
+ <el-input v-model="formData.soapAction"></el-input>
</el-form-item>
- <el-form-item v-if="formData.interfaceType=='webService'" label="鍙傛暟鍚嶇О" prop="targName">
- <el-input v-model="formData.targName" ></el-input>
+ <el-form-item v-if="formData.interfaceType=='webService'" label="鍙傛暟鍚嶇О" prop="targetName">
+ <el-input v-model="formData.targetName"></el-input>
</el-form-item>
<el-form-item v-if="formData.interfaceType=='webService'" label="cxfaxis" prop="cxfaxis">
- <el-input v-model="formData.cxfaxis" ></el-input>
+ <el-input v-model="formData.cxfaxis"></el-input>
</el-form-item>
<el-form-item v-if="formData.interfaceType=='classPath'" label="绫昏矾寰�" prop="classPath">
- <el-input v-model="formData.classPath" ></el-input>
+ <el-input v-model="formData.classPath"></el-input>
+ </el-form-item>
+ <el-form-item v-if="showFormItem" :label="GroupLabel" prop="isGroupCodeFlag">
+ <el-switch v-model="groupCode" @change="handleSwitchChange"></el-switch>
</el-form-item>
<el-tabs v-model="activeName" @tab-click="tabClick">
<el-tab-pane label="鍙傛暟瀵硅薄" name="paramTab">
- <avue-crud :option="param.option"
- :data="formData.sysIntParamVOs"
+ <avue-crud ref="paramcrud"
v-model="formData.sysIntParamVOs"
- ref="paramcrud">
+ :data="formData.sysIntParamVOs"
+ :option="param.option">
<template slot="menuLeft">
- <el-button type="primary"
- size="small"
+ <el-button icon="el-icon-plus"
plain
- icon="el-icon-plus"
+ size="small"
+ type="primary"
@click="handleParamAdd">娣诲姞琛�
</el-button>
</template>
<template slot="menu" slot-scope="{row,index}">
- <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="handleParamEditClick(row,index)">缂栬緫
+ <el-button v-if="!row.$cellEdit" icon="el-icon-edit" size="small" type="text"
+ @click="handleParamEditClick(row,index)">缂栬緫
</el-button>
- <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit" @click="handleParamDel(row,index)">绉婚櫎
+ <el-button v-if="!row.$cellEdit" icon="el-icon-delete" size="small" type="text"
+ @click="handleParamDel(row,index)">绉婚櫎
</el-button>
- <el-button icon="el-icon-check" size="small" type="text" v-if="row.$cellEdit" @click="handleParamEditSave(row,index)">
+ <el-button v-if="row.$cellEdit" icon="el-icon-check" size="small" type="text"
+ @click="handleParamEditSave(row,index)">
淇濆瓨
</el-button>
</template>
</avue-crud>
</el-tab-pane>
<el-tab-pane label="header瀵硅薄" name="headerTab">
- <avue-crud :option="header.option"
- :data="formData.sysIntHeaderVOs"
+ <avue-crud ref="headercrud"
v-model="formData.sysIntHeaderVOs"
- ref="headercrud">
+ :data="formData.sysIntHeaderVOs"
+ :option="header.option">
<template slot="menuLeft">
- <el-button type="primary"
- size="small"
+ <el-button icon="el-icon-plus"
plain
- icon="el-icon-plus"
+ size="small"
+ type="primary"
@click="handleHeaderAdd">娣诲姞琛�
</el-button>
</template>
<template slot="menu" slot-scope="{row,index}">
- <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="handleHeaderEditClick(row,index)">缂栬緫
+ <el-button v-if="!row.$cellEdit" icon="el-icon-edit" size="small" type="text"
+ @click="handleHeaderEditClick(row,index)">缂栬緫
</el-button>
- <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit" @click="handleHeaderDel(row,index)">绉婚櫎
+ <el-button v-if="!row.$cellEdit" icon="el-icon-delete" size="small" type="text"
+ @click="handleHeaderDel(row,index)">绉婚櫎
</el-button>
- <el-button icon="el-icon-check" size="small" type="text" v-if="row.$cellEdit" @click="handleHeaderEditSave(row,index)">
+ <el-button v-if="row.$cellEdit" icon="el-icon-check" size="small" type="text"
+ @click="handleHeaderEditSave(row,index)">
淇濆瓨
</el-button>
</template>
@@ -186,7 +215,6 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitAttribute">纭畾</el-button>
- <el-button @click="cancelSubmit">鍙栨秷</el-button>
</div>
</el-dialog>
@@ -194,9 +222,9 @@
</template>
<script>
-import { validatenull } from "@/util/validate";
-import { getDictionary, getParentList } from '@/api/omd/enum'
-import {add,edit} from "@/api/docking/info"
+import {validatenull} from "@/util/validate";
+import {getDictionary, getParentList} from '@/api/omd/enum'
+import {add, edit} from "@/api/docking/info"
import vciWebRefer from "@/components/refer/vciWebRefer.vue";
export default {
@@ -204,15 +232,17 @@
props: {
formData: {
type: Object,
- default:{
- sysIntParamVOs:[],
- sysIntHeaderVOs:[]
+ default: {
+ sysIntParamVOs: [],
+ sysIntHeaderVOs: []
}
},
},
- components: { vciWebRefer },
+ components: {vciWebRefer},
data() {
return {
+ groupCode: false,
+ referUrl: '/api/ubcs-code/dockingManagement/gridDockingSystem',
showSubmitDialog: false,
//鎺ュ彛绫诲瀷涓嬫媺
interfaceTypeList: [{
@@ -234,10 +264,18 @@
}, {
label: 'Json', value: 'json'
}],
+ //鍐呭绫诲瀷
+ contentTypeList: [{
+ label: 'application/json', value: 'application/json'
+ }, {
+ label: 'application/x-www-form-urlencoded', value: 'application/x-www-form-urlencoded'
+ }, {
+ label: 'multipart/form-data', value: 'multipart/form-data'
+ }],
dataFlowTypeList: [{
label: '鎺ㄩ��', value: 'push'
}, {
- label: '鎺ュ彈', value: 'accept'
+ label: '鎺ユ敹', value: 'accept'
}],
//鎺ㄩ�佺被鍨�
pushTypeList: [{value: '1', label: '鏁版嵁鎺ㄩ��'},
@@ -264,13 +302,13 @@
{required: true, message: '璇烽�夋嫨鎺ㄩ�佺被鍨�', trigger: 'blur'}
],
classifyName: [
- {required: true, message: '璇烽�夋嫨', trigger: 'sbumit'}
+ {required: true, message: '璇烽�夋嫨', trigger: 'submit'}
],
sourceSystemName: [
- {required: true, message: '璇烽�夋嫨', trigger: 'sbumit'}
+ {required: true, message: '璇烽�夋嫨', trigger: 'submit'}
],
targetSystemName: [
- {required: true, message: '璇烽�夋嫨', trigger: 'sbumit'}
+ {required: true, message: '璇烽�夋嫨', trigger: 'submit'}
],
classPath: [
{required: true, message: '璇疯緭鍏ョ被璺緞', trigger: 'blur'}
@@ -290,11 +328,14 @@
soapAction: [
{required: true, message: '璇疯緭鍏oapAction', trigger: 'blur'}
],
- targName: [
+ targetName: [
{required: true, message: '璇疯緭鍏ュ弬鏁板悕绉�', trigger: 'blur'}
],
cxfaxis: [
{required: true, message: '璇疯緭鍏xfaxis', trigger: 'blur'}
+ ],
+ contentType: [
+ {required: true, message: '璇烽�夋嫨contentType', trigger: 'submit'}
]
},
// 琛ㄦ牸閰嶇疆
@@ -369,65 +410,123 @@
// 閫夊畾琛�
selectRow: ''
},
- dictEnums: []
+ dictEnums: [],
+
}
}
},
- watch:{
- formData:{
- handler(newval,oldval){
- console.log('newval',newval.dataFlowTypeText)
+ watch: {
+ formData: {
+ handler(newval, oldval) {
+ // console.log(newval)
+ if (newval && newval.type === 'edit') {
+ if (this.formData.dataFlowType == 'accept') {
+ this.pushTypeList = [
+ {value: '3', label: '缂栫爜鐢宠'},
+ {value: '4', label: '缂栫爜鏇存敼锛堢姸鎬併�佸洖鏀讹級'},
+ {value: '5', label: '鍒嗙被鏌ヨ'},
+ {value: '6', label: '鍚鍒欎俊鎭殑鍒嗙被鏌ヨ'},
+ {value: '7', label: '鏁版嵁鏌ヨ'}
+ ];
+ this.$nextTick(() => {
+ // this.formData.pushType = '';
+ this.formData.targetSystemName = '缂栫爜绯荤粺';
+ this.formData.targetSystemOid = 'code00000001';
+ this.formData.targetSystemId = 'CODE';
+
+ // this.formData.sourceSystemName = '';
+ // this.formData.sourceSystemOid = '';
+ // this.formData.sourceSystemId = '';
+ });
+ } else {
+ this.pushTypeList = [
+ {value: '1', label: '鏁版嵁鎺ㄩ��'},
+ {value: '2', label: '鍒嗙被鎺ㄩ��'}
+ ];
+ this.$nextTick(() => {
+ this.formData.pushType = '1';
+ this.formData.sourceSystemName = '缂栫爜绯荤粺';
+ this.formData.sourceSystemOid = 'code00000001';
+ this.formData.sourceSystemId = 'CODE';
+ // this.formData.targetSystemName = '';
+ // this.formData.targetSystemOid = '';
+ // this.formData.targetSystemId = '';
+ });
+ }
+ }
}
- }
+ },
+ },
+ computed: {
+ showFormItem() {
+ return ["1", "3", "4", "7"].includes(this.formData.pushType);
+ },
+ GroupLabel() {
+ if (this.formData.pushType === "1") {
+ return "鏄惁鎺ㄩ�侀泦鍥㈢爜";
+ } else if (this.formData.pushType === "3") {
+ return "鏄惁鐢宠闆嗗洟鐮�";
+ } else if (this.formData.pushType === "4") {
+ return "鏄惁缁存姢闆嗗洟鐮�";
+ } else if (this.formData.pushType === "7") {
+ return "鏄惁鏌ヨ闆嗗洟鐮�";
+ }
+ },
},
created() {
//this.geDictData('interfaceType', this.interfaceTypeList)
},
- mounted(){
+ mounted() {
if (!this.formData.sysIntParamVOs) {
this.formData.sysIntParamVOs = [];
}
if (!this.formData.sysIntHeaderVOs) {
this.formData.sysIntHeaderVOs = [];
}
- if(this.formData.dataFlowType=='accept'){
- this.pushTypeList=[
+ if (this.formData.dataFlowType == 'accept') {
+ this.pushTypeList = [
{value: '3', label: '缂栫爜鐢宠'},
{value: '4', label: '缂栫爜鏇存敼锛堢姸鎬併�佸洖鏀讹級'},
{value: '5', label: '鍒嗙被鏌ヨ'},
{value: '6', label: '鍚鍒欎俊鎭殑鍒嗙被鏌ヨ'},
{value: '7', label: '鏁版嵁鏌ヨ'}]
- this.formData.pushType=''
- this.formData.targetSystemName='缂栫爜绯荤粺';
- this.formData.targetSystemOid='code00000001';
- this.formData.targetSystemId='CODE';
+ // this.formData.pushType=''
+ this.formData.targetSystemName = '缂栫爜绯荤粺';
+ this.formData.targetSystemOid = 'code00000001';
+ this.formData.targetSystemId = 'CODE';
- this.formData.sourceSystemName='';
- this.formData.sourceSystemOid='';
- this.formData.sourceSystemId='';
- }else {
- this.pushTypeList=[{value: '1', label: '鏁版嵁鎺ㄩ��'},
+ this.formData.sourceSystemName = '';
+ this.formData.sourceSystemOid = '';
+ this.formData.sourceSystemId = '';
+ } else {
+ this.pushTypeList = [{value: '1', label: '鏁版嵁鎺ㄩ��'},
{value: '2', label: '鍒嗙被鎺ㄩ��'}]
- this.formData.pushType='1' ;
- this.formData.sourceSystemName='缂栫爜绯荤粺';
- this.formData.sourceSystemOid='code00000001';
- this.formData.sourceSystemId='CODE';
- this.formData.targetSystemName='';
- this.formData.targetSystemOid='';
- this.formData.targetSystemId='';
+ this.formData.pushType = '1';
+ this.formData.sourceSystemName = '缂栫爜绯荤粺';
+ this.formData.sourceSystemOid = 'code00000001';
+ this.formData.sourceSystemId = 'CODE';
+ this.formData.targetSystemName = '';
+ this.formData.targetSystemOid = '';
+ this.formData.targetSystemId = '';
}
},
methods: {
+ handleSwitchChange(newValue) {
+ this.groupCode = newValue;
+ this.formData.isGroupCodeFlag = newValue.toString();
+ },
closeSubmitDialog() {
- this.resetForm();
+ // this.resetForm();
this.showSubmitDialog = false;
+ // this.$refs.form.resetFields()
+ this.formData = {}
+ this.$refs.form.clearValidate()
},
resetForm() {
- this.formData={}
- // this.formData = {
- // sysIntParamVOs: [],
- // sysIntHeaderVOs: []
- // };
+ this.formData = {
+ sysIntParamVOs: [],
+ sysIntHeaderVOs: []
+ };
this.$refs.form.resetFields();
},
setReferValue(data) {
@@ -474,45 +573,50 @@
},
submitAttribute() {
const that = this;
- let pass=true
- if(this.formData.dataFlowType=='push' && (validatenull(this.formData.classifyName)||validatenull(this.formData.targetSystemName))){
+ let pass = true
+ if (this.formData.dataFlowType == 'push' && (validatenull(this.formData.classifyName) || validatenull(this.formData.targetSystemName))) {
that.$message.error('蹇呭~椤逛笉鑳戒负绌�');
- pass=false
+ pass = false
return;
}
- if(this.formData.dataFlowType=='accept' && (validatenull(this.formData.sourceSystemName))){
+ if (this.formData.dataFlowType == 'accept' && (validatenull(this.formData.sourceSystemName))) {
that.$message.error('闆嗘垚绯荤粺涓嶈兘涓虹┖');
- pass=false
+ pass = false
return;
}
- this.$refs.form.validateField(['paramType','returnType','dataFlowType','pushType','classPath','requestMethod','requestUrl',
- 'interfaceFunction','nameSpace','soapAction','targName','cxfaxis'],function (errormsg, field) {
+ this.$refs.form.validateField(['paramType', 'returnType', 'dataFlowType', 'pushType', 'classPath', 'requestMethod', 'requestUrl',
+ 'interfaceFunction', 'nameSpace', 'soapAction', 'targetName', 'cxfaxis'], function (errormsg, field) {
if (errormsg) {
- pass=false
+ pass = false
}
})
- this.$nextTick(function (){
- if(pass){
- that.formData.sysIntParamDTOs=this.formData.sysIntParamVOs.map(item=>{
+ this.$nextTick(function () {
+ if (pass) {
+ that.formData.sysIntParamDTOS = this.formData.sysIntParamVOs.map(item => {
return {
...item,
- ordernNo:item.$index
+ ordernNo: item.$index
}
})
- that.formData.sysIntHeaderDTOS=this.formData.sysIntHeaderVOs.map(item=>{
+ that.formData.sysIntHeaderDTOS = this.formData.sysIntHeaderVOs.map(item => {
return {
...item,
- ordernNo:item.$index
+ ordernNo: item.$index
}
})
- add(that.formData).then(res => {
- that.$message.success("淇濆瓨鎴愬姛");
+ const apiCall = that.formData.type == 'edit' ? edit : add;
+ const Message = that.formData.type == 'edit' ? "淇敼鎴愬姛" : "淇濆瓨鎴愬姛";
+ // console.log( that.formData)
+ apiCall(that.formData).then(res => {
+ that.$message.success(Message);
that.showSubmitDialog = false;
+ this.$refs.form.resetFields();
this.formData = {
sysIntParamVOs: [],
sysIntHeaderVOs: []
};
that.$emit('refreshTable');
+ that.formData.type = null;
});
}
})
@@ -533,47 +637,47 @@
}
});
},
- dataFlowTypeChange(value){
- if(value=='push'){
- this.pushTypeList=[{value: '1', label: '鏁版嵁鎺ㄩ��'},
+ dataFlowTypeChange(value) {
+ if (value == 'push') {
+ this.pushTypeList = [{value: '1', label: '鏁版嵁鎺ㄩ��'},
{value: '2', label: '鍒嗙被鎺ㄩ��'}]
- this.formData.pushType='1';
- this.formData.sourceSystemName='缂栫爜绯荤粺';
- this.formData.sourceSystemOid='code00000001';
- this.formData.sourceSystemId='CODE';
- this.formData.targetSystemName='';
- this.formData.targetSystemOid='';
- this.formData.targetSystemId='';
- }else if(value=='accept'){
- this.pushTypeList=[
+ this.formData.pushType = '1';
+ this.formData.sourceSystemName = '缂栫爜绯荤粺';
+ this.formData.sourceSystemOid = 'code00000001';
+ this.formData.sourceSystemId = 'CODE';
+ this.formData.targetSystemName = '';
+ this.formData.targetSystemOid = '';
+ this.formData.targetSystemId = '';
+ } else if (value == 'accept') {
+ this.pushTypeList = [
{value: '3', label: '缂栫爜鐢宠'},
{value: '4', label: '缂栫爜鏇存敼锛堢姸鎬併�佸洖鏀讹級'},
{value: '5', label: '鍒嗙被鏌ヨ'},
{value: '6', label: '鍚鍒欎俊鎭殑鍒嗙被鏌ヨ'},
{value: '7', label: '鏁版嵁鏌ヨ'}]
- this.formData.pushType='';
- this.formData.targetSystemName='缂栫爜绯荤粺';
- this.formData.targetSystemOid='code00000001';
- this.formData.targetSystemId='CODE';
+ this.formData.pushType = '';
+ this.formData.targetSystemName = '缂栫爜绯荤粺';
+ this.formData.targetSystemOid = 'code00000001';
+ this.formData.targetSystemId = 'CODE';
- this.formData.sourceSystemName='';
- this.formData.sourceSystemOid='';
- this.formData.sourceSystemId='';
- }else{
- this.pushTypeList=[];
+ this.formData.sourceSystemName = '';
+ this.formData.sourceSystemOid = '';
+ this.formData.sourceSystemId = '';
+ } else {
+ this.pushTypeList = [];
}
this.$refs.form.clearValidate()
},
- pushTypeChange(value){
+ pushTypeChange(value) {
this.$refs.form.clearValidate()
},
tabClick(tab) {
if (tab.name === 'paramTab') {
- this.$nextTick(function (){
+ this.$nextTick(function () {
this.$refs.paramcrud.doLayout()
})
} else {
- this.$nextTick(function (){
+ this.$nextTick(function () {
this.$refs.headercrud.doLayout()
})
}
@@ -581,39 +685,39 @@
handleParamAdd() {
this.formData.sysIntParamVOs.push({
usedFlag: true,
- $cellEdit:true
+ $cellEdit: true
})
- this.$nextTick(function (){
+ this.$nextTick(function () {
this.$refs.paramcrud.doLayout()
})
},
- handleParamEditClick(row){
+ handleParamEditClick(row) {
row.$cellEdit = true;
},
- handleParamDel(row,index){
+ handleParamDel(row, index) {
this.formData.sysIntParamVOs.splice(index, 1);
},
// 鍒楄〃缂栬緫淇濆瓨
- handleParamEditSave(row,index) {
+ handleParamEditSave(row, index) {
row.$cellEdit = false;
},
handleHeaderAdd() {
this.formData.sysIntHeaderVOs.push({
usedFlag: true,
- $cellEdit:true
+ $cellEdit: true
})
- this.$nextTick(function (){
+ this.$nextTick(function () {
this.$refs.headercrud.doLayout()
})
},
- handleHeaderEditClick(row){
+ handleHeaderEditClick(row) {
row.$cellEdit = true;
},
- handleHeaderDel(row,index){
+ handleHeaderDel(row, index) {
this.formData.sysIntHeaderVOs.splice(index, 1);
},
// 鍒楄〃缂栬緫淇濆瓨
- handleHeaderEditSave(row,index) {
+ handleHeaderEditSave(row, index) {
row.$cellEdit = false;
}
}
@@ -621,18 +725,23 @@
</script>
<style>
-.btmTable>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu {
+.btmTable > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu {
display: none !important;
}
-.enumTable>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu {
+.enumTable > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu {
display: none !important;
}
-.dockingForm .el-form-item__label{width: 130px;}
-.dockingForm .el-form-item__content,.dockingForm .el-form-item__content .el-input>.el-input__inner,.dockingForm .el-input-number--medium {
+
+.dockingForm .el-form-item__label {
+ width: 130px;
+}
+
+.dockingForm .el-form-item__content, .dockingForm .el-form-item__content .el-input > .el-input__inner, .dockingForm .el-input-number--medium {
width: 300px !important;
}
-.dockingForm .cell .el-form-item__content,.dockingForm .cell .el-form-item__content .el-input>.el-input__inner{
- width :100% !important;
+
+.dockingForm .cell .el-form-item__content, .dockingForm .cell .el-form-item__content .el-input > .el-input__inner {
+ width: 100% !important;
}
</style>
--
Gitblit v1.9.3