|
|
@@ -186,7 +186,7 @@
|
|
|
请求参数
|
|
|
</div>
|
|
|
<div style="display: flex;justify-content: flex-end;margin-right: 2%;">
|
|
|
- <el-button @click="addPa" style="margin-top: 1%;" type="success" size="mini" plain>新增参数</el-button>
|
|
|
+ <el-button @click="addPa" style="margin-top: 1%;" type="success" size="mini" :disabled="isEdit" plain>新增参数</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
@@ -200,14 +200,14 @@
|
|
|
<el-table-column prop="itemName" label="参数字段">
|
|
|
<template #default="scope">
|
|
|
<div style="width: 100%;">
|
|
|
- <el-input placeholder="请填写参数编码" type="primary" class="noBor" v-model="scope.row.paraCode" size="mini" text style="margin-left: 0%;border: transparent;"></el-input>
|
|
|
+ <el-input :disabled="isEdit" placeholder="请填写参数编码" type="primary" class="noBor" v-model="scope.row.paraCode" size="mini" text style="margin-left: 0%;border: transparent;"></el-input>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="itemName" label="参数名称">
|
|
|
<template #default="scope">
|
|
|
<div style="width: 100%;">
|
|
|
- <el-input placeholder="请填写参数名称" type="primary" class="noBor" v-model="scope.row.paraName" size="mini" text style="margin-left: 0%;"></el-input>
|
|
|
+ <el-input :disabled="isEdit" placeholder="请填写参数名称" type="primary" class="noBor" v-model="scope.row.paraName" size="mini" text style="margin-left: 0%;"></el-input>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -217,6 +217,7 @@
|
|
|
<el-select
|
|
|
v-model="scope.row.paraType"
|
|
|
class="noBorSel"
|
|
|
+ :disabled="isEdit"
|
|
|
placeholder=""
|
|
|
style="width: 100%;margin-left: 0%;"
|
|
|
>
|
|
|
@@ -233,7 +234,7 @@
|
|
|
<el-table-column prop="itemName" label="参数说明" >
|
|
|
<template #default="scope">
|
|
|
<div style="width: 100%;">
|
|
|
- <el-input type="primary" class="noBor" v-model="scope.row.paraNote" size="mini" text style="margin-left: 0%;"></el-input>
|
|
|
+ <el-input type="primary" :disabled="isEdit" class="noBor" v-model="scope.row.paraNote" size="mini" text style="margin-left: 0%;"></el-input>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -308,7 +309,7 @@
|
|
|
}"
|
|
|
lang="zh"
|
|
|
/> -->
|
|
|
- <el-input placeholder="请输入示例" :rows="8" type="textarea" v-model="dataJsonXiang" size="mini" text style="margin-top: 0%;width: 98%;" ></el-input>
|
|
|
+ <el-input :disabled="isEdit" placeholder="请输入示例" :rows="8" type="textarea" v-model="dataJsonXiang" size="mini" text style="margin-top: 0%;width: 98%;" ></el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="margin-top: 2.5%;margin-left: 0%;padding-bottom: 1%;">
|
|
|
@@ -318,7 +319,7 @@
|
|
|
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
- <el-input placeholder="请输入示例" :rows="8" type="textarea" v-model="example" size="mini" text style="margin-top: -1%;width: 98%;" ></el-input>
|
|
|
+ <el-input :disabled="isEdit" placeholder="请输入示例" :rows="8" type="textarea" v-model="example" size="mini" text style="margin-top: -1%;width: 98%;" ></el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-dialog @close="clearAdd" v-model="dialogVisible" title="新增节点" width="70%" destroy-on-close :key="tableKey">
|
|
|
@@ -920,7 +921,7 @@ function saveAdd1Level(){
|
|
|
}
|
|
|
async function delSer(){
|
|
|
proxy.$modal.confirm('是否确认删除?').then(function () {
|
|
|
- return delService(parId.value.id);
|
|
|
+ return delService(parId.value);
|
|
|
}).then(() => {
|
|
|
getTreeLeft();
|
|
|
proxy.$modal.msgSuccess("删除成功");
|
|
|
@@ -934,6 +935,7 @@ async function saveEditService(){
|
|
|
});
|
|
|
console.log(valid)
|
|
|
if(valid){
|
|
|
+ console.log()
|
|
|
var par = formJi.value
|
|
|
par.example = example.value
|
|
|
par.rpcontent = dataJsonXiang.value
|
|
|
@@ -942,7 +944,10 @@ async function saveEditService(){
|
|
|
await editService(par).then(res=>{
|
|
|
if(res.code===200){
|
|
|
var parCan = tableDataCan.value
|
|
|
- parCan.srvId = parId.value.srvId
|
|
|
+ parCan.forEach(item => {
|
|
|
+ item.srvId = parId.value
|
|
|
+ });
|
|
|
+ // parCan.srvId = parId.value
|
|
|
addServiceParam(parCan).then(res1=>{
|
|
|
if(res1.code===200){
|
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
|
@@ -990,9 +995,9 @@ function showAdd(){
|
|
|
async function handleNodeClick(node,data,event){
|
|
|
parTree.value = data.data
|
|
|
currentNodeKey.value = data.data.id
|
|
|
- console.log(data.data.nodeType)
|
|
|
+ console.log(data.data.id)
|
|
|
isEdit.value = false
|
|
|
- parId.value = data.data
|
|
|
+ parId.value = data.data.id
|
|
|
await getSerDe(data.data.id).then(res=>{
|
|
|
detail.value = res.data.ptService
|
|
|
tableDataCan.value = res.data.list
|
|
|
@@ -1072,7 +1077,7 @@ function buildTree(flatData, rootValue = '0') {
|
|
|
}
|
|
|
function addPa(){
|
|
|
var par = {
|
|
|
- itemName:''
|
|
|
+
|
|
|
}
|
|
|
tableDataCan.value.push(par)
|
|
|
}
|