|
@@ -4,12 +4,12 @@
|
|
|
<div style="display: flex;padding-top: 1%;padding-top: 5%;">
|
|
<div style="display: flex;padding-top: 1%;padding-top: 5%;">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="inputNode"
|
|
v-model="inputNode"
|
|
|
- style="width:75%;margin-left: 5%;background-color: #ebeef5;"
|
|
|
|
|
|
|
+ style="width:90%;margin-left: 5%;background-color: #ebeef5;"
|
|
|
class="w-50 m-2"
|
|
class="w-50 m-2"
|
|
|
:prefix-icon="Search"
|
|
:prefix-icon="Search"
|
|
|
/>
|
|
/>
|
|
|
<!-- <el-button style="margin-left: 2%;width: 10%;background-color: #F7F7F7" :icon="Filter"/> -->
|
|
<!-- <el-button style="margin-left: 2%;width: 10%;background-color: #F7F7F7" :icon="Filter"/> -->
|
|
|
- <el-button type="primary" @click="showAdd" style="margin-left: 5%;width: 10%;" :icon="Plus"/>
|
|
|
|
|
|
|
+ <!-- <el-button type="primary" @click="showAdd" style="margin-left: 5%;width: 10%;" :icon="Plus"/> -->
|
|
|
</div>
|
|
</div>
|
|
|
<!-- <Plus style="width: 1em; height: 1em; margin-left:90%;cursor: pointer;color: #337ecc;" @click="showAddTree"/> -->
|
|
<!-- <Plus style="width: 1em; height: 1em; margin-left:90%;cursor: pointer;color: #337ecc;" @click="showAddTree"/> -->
|
|
|
<el-tree :expand-on-click-node="false" ref="treeRef" :filter-node-method="filterNode" :current-node-key="currentNodeKey" class="treeLeft" :data="data" @node-click="handleNodeClick" node-key="id" style="margin-left: 5%;margin-top: 5%;width: 90%;background-color: transparent;" default-expand-all :key="valueKet">
|
|
<el-tree :expand-on-click-node="false" ref="treeRef" :filter-node-method="filterNode" :current-node-key="currentNodeKey" class="treeLeft" :data="data" @node-click="handleNodeClick" node-key="id" style="margin-left: 5%;margin-top: 5%;width: 90%;background-color: transparent;" default-expand-all :key="valueKet">
|
|
@@ -21,7 +21,7 @@
|
|
|
<svg-icon svg-icon icon-class="cate" style="color: red;" v-if="data.nodeType=='TREE'"/>
|
|
<svg-icon svg-icon icon-class="cate" style="color: red;" v-if="data.nodeType=='TREE'"/>
|
|
|
<span>{{ node.label }}</span>
|
|
<span>{{ node.label }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style="margin-right: 1%;position: absolute;margin-left: 75%;">
|
|
|
|
|
|
|
+ <!-- <div style="margin-right: 1%;position: absolute;margin-left: 75%;">
|
|
|
<el-dropdown trigger="hover" @click.stop v-if="currentNodeKey === data.id&&data.nodeType!=='SERVICE'">
|
|
<el-dropdown trigger="hover" @click.stop v-if="currentNodeKey === data.id&&data.nodeType!=='SERVICE'">
|
|
|
<el-icon class="el-icon--right" style="color: black;">
|
|
<el-icon class="el-icon--right" style="color: black;">
|
|
|
<plus />
|
|
<plus />
|
|
@@ -56,409 +56,84 @@
|
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
|
</template>
|
|
</template>
|
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-tree>
|
|
</el-tree>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="width: 84%;margin-left: 1%;padding-top: 0.5%;" class="tab-container">
|
|
<div style="width: 84%;margin-left: 1%;padding-top: 0.5%;" class="tab-container">
|
|
|
- <div style="height: 90vh;overflow: auto;">
|
|
|
|
|
- <div style="display: flex;align-items: center;justify-content: space-between;">
|
|
|
|
|
- <div style="margin-left:1%;">{{detail.name}}</div>
|
|
|
|
|
- <div style="display: flex;">
|
|
|
|
|
- <!-- <el-button type="primary" size="mini" :icon="Promotion" @click="fetchData">运行</el-button>
|
|
|
|
|
- <el-button type="" size="mini">删除</el-button> -->
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="display: flex;align-items: center;margin-left:1%;margin-top: 1%;">
|
|
|
|
|
- <el-tag v-if="formJi.type" class="ml-2">
|
|
|
|
|
- {{formJi.type}}
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- <el-tag v-if="formJi.rqtype=='POST'||formJi.rqtype=='post'" style="margin-left:0.5%;" class="ml-2" type="warning">
|
|
|
|
|
- {{formJi.rqtype}}
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- <el-tag v-if="formJi.rqtype=='GET'||formJi.rqtype=='get'" type="success" style="margin-left: 0.5%;" class="ml-2">
|
|
|
|
|
- {{formJi.rqtype}}
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- <div style="margin-left: 1%;">
|
|
|
|
|
- {{detail.url}}
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-icon style="margin-left: 1%;cursor: pointer;color:#909399" @click="copyUrl"><CopyDocument /></el-icon>
|
|
|
|
|
- <div style="margin-left: 0.5%;">
|
|
|
|
|
- <!-- <el-select class="transparent-select" v-model="valueSta" style="border-color: transparent;width: 100px;">
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in options"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="flex items-center" style="display: flex;align-items: center;">
|
|
|
|
|
- <div v-if="item.label=='开发中'" style="width: 5px; height: 5px; background-color: #409EFF; border-radius: 50%;"></div>
|
|
|
|
|
- <div v-if="item.label=='运行中'" style="width: 5px; height: 5px; background-color: #67C23A; border-radius: 50%;"></div>
|
|
|
|
|
- <span style="margin-left:1%;">{{ item.label }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-option>
|
|
|
|
|
- <template #prefix>
|
|
|
|
|
- <div class="flex items-center" style="display: flex; align-items: center;">
|
|
|
|
|
- <div v-if="valueSta && options.find(opt => opt.value === valueSta)?.label === '开发中'"
|
|
|
|
|
- style="width: 5px; height: 5px; background-color: #409EFF; border-radius: 50%; margin-right: 4px;"></div>
|
|
|
|
|
- <div v-if="valueSta && options.find(opt => opt.value === valueSta)?.label === '运行中'"
|
|
|
|
|
- style="width: 5px; height: 5px; background-color: #67C23A; border-radius: 50%; margin-right: 4px;"></div>
|
|
|
|
|
- <span>{{ valueSta ? options.find(opt => opt.value === valueSta)?.label : '请选择' }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-select> -->
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="display: flex;width: 100%;">
|
|
|
|
|
- <div style="display: flex;margin-left: 1%;font-size: 15px;color:#909399;width:100%;margin-top: 1%;">
|
|
|
|
|
-
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="margin-left: 1%;font-size: 15px;color:#909399;width:100%;display: flex;margin-top: 0.5%;">
|
|
|
|
|
- <div style="margin-left: 0%;">
|
|
|
|
|
- 服务说明:
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="margin-left: 0.5%;">
|
|
|
|
|
- {{detail.name}}
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="margin-left: 1%;font-size: 15px;color:#909399;width:100%;display: flex;margin-top: 0.5%;">
|
|
|
|
|
- <!-- <div style="margin-left: 0%;">
|
|
|
|
|
- 返回说明:
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="margin-left: 0.5%;">
|
|
|
|
|
- {{detail.name}}
|
|
|
|
|
- </div> -->
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="margin-top: 2.5%;margin-left: 1%;">
|
|
|
|
|
- <el-tabs type="card" style="margin-top: 1%;width: 90%;">
|
|
|
|
|
- <el-tab-pane label="请求参数">
|
|
|
|
|
-
|
|
|
|
|
- </el-tab-pane>
|
|
|
|
|
- </el-tabs>
|
|
|
|
|
- <el-table
|
|
|
|
|
- style="margin-top: -1%;width: 90%;"
|
|
|
|
|
- :data="tableDataCan"
|
|
|
|
|
- :cell-style="{ textAlign: 'center', }"
|
|
|
|
|
- :header-cell-style="{ textAlign: 'center'}"
|
|
|
|
|
- :row-style="{ height: heightAll*0.01+'px',fontSize: '16px',textAlign:'center' }"
|
|
|
|
|
- border >
|
|
|
|
|
- <el-table-column prop="paramCode" label="参数字段">
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="paramName" label="参数名称">
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="paramType" label="参数类型" width="140">
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="paramNote" label="参数说明">
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="margin-top: 2.5%;margin-left: 1%;">
|
|
|
|
|
- <el-tabs type="card" style="margin-top: 1%;width: 90%;">
|
|
|
|
|
- <el-tab-pane label="成功(200)">
|
|
|
|
|
- <div style="display: flex;align-items: center;line-height: 1.5;font-size: 14px;margin-left: 1%;color: #606266;">
|
|
|
|
|
- <!-- <div>HTTP状态码:</div>
|
|
|
|
|
- <div>200</div>
|
|
|
|
|
- <div style="margin-left: 5%;">内容格式:</div>
|
|
|
|
|
- <div>JSON</div> -->
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- <el-tree :data="dataReturn" :props="defaultProps" @node-click="handleNodeClick" style="margin-top: 1%;margin-left: 2%;background-color: #F7F7F7;background-color: transparent;width: 15%;" default-expand-all>
|
|
|
|
|
- <template #default="{ node, data }">
|
|
|
|
|
- <span style="display: flex;justify-content: space-between;width: 100%;align-items: center;">
|
|
|
|
|
- <span>{{ node.label }}</span>
|
|
|
|
|
- <span style="display: flex;align-items: center;">
|
|
|
|
|
- <div style="color:#67C23A;">string</div>
|
|
|
|
|
- <el-tooltip
|
|
|
|
|
- class="box-item"
|
|
|
|
|
- effect="light"
|
|
|
|
|
- content="必填"
|
|
|
|
|
- placement="top-start"
|
|
|
|
|
- >
|
|
|
|
|
- <el-button style="transform: scale(0.5);transform-origin: center;margin-left: 5%; " type="success" :icon="Check" circle size="mini" plain/>
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
- </span>
|
|
|
|
|
- </span>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-tree> -->
|
|
|
|
|
-
|
|
|
|
|
- </el-tab-pane>
|
|
|
|
|
- </el-tabs>
|
|
|
|
|
- <div style="margin-top: -1%;width: 90%;">
|
|
|
|
|
- <json-viewer
|
|
|
|
|
- :value="dataReturn"
|
|
|
|
|
- :expand-depth="5"
|
|
|
|
|
- copyable
|
|
|
|
|
- theme="my-theme"
|
|
|
|
|
- />
|
|
|
|
|
- <!-- <JsonEditorVue
|
|
|
|
|
- v-model="dataReturn"
|
|
|
|
|
- style="height:98%;width: 100%;"
|
|
|
|
|
- :mode="'code'"
|
|
|
|
|
- :showBtns="false"
|
|
|
|
|
- :options="{
|
|
|
|
|
- navigationBar: false, // 隐藏顶部导航栏
|
|
|
|
|
- statusBar: false, // 隐藏底部状态栏
|
|
|
|
|
- mode: 'code', // 仅保留代码编辑模式
|
|
|
|
|
- mainMenuBar: false // 隐藏主菜单栏
|
|
|
|
|
- }"
|
|
|
|
|
- lang="zh"
|
|
|
|
|
- /> -->
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="margin-top: 2.5%;margin-left: 1%;padding-bottom: 1%;width: 90%;">
|
|
|
|
|
- <div>响应示例</div><el-tabs type="card" style="margin-top: 1%;">
|
|
|
|
|
- <el-tab-pane label="成功示例">
|
|
|
|
|
- <div style="overflow: auto;height: 30vh">
|
|
|
|
|
- <json-viewer
|
|
|
|
|
- :value="dataJsonXiang"
|
|
|
|
|
- :expand-depth="5"
|
|
|
|
|
- copyable
|
|
|
|
|
- theme="my-theme"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-tab-pane>
|
|
|
|
|
- </el-tabs>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ :data="tableData"
|
|
|
|
|
+ style="width: 98%;margin-left: 1%;margin-top: 0.5%;"
|
|
|
|
|
+ :cell-style="{ padding:'5px' }"
|
|
|
|
|
+ :header-cell-style="{height: heightAll*0.01+'px',}"
|
|
|
|
|
+ :row-style="{ fontSize: '16px',textAlign:'center'}"
|
|
|
|
|
+ border >
|
|
|
|
|
+ <el-table-column type="index" label="序号" width="80">
|
|
|
|
|
+ <template #default="{ $index }">
|
|
|
|
|
+ <div style="text-align: center;">
|
|
|
|
|
+ {{ $index + 1 }}
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <el-dialog @close="clearAdd" v-model="dialogVisible" title="新增节点" width="70%" destroy-on-close :key="tableKey">
|
|
|
|
|
- <div style="overflow: auto;height: 80vh;">
|
|
|
|
|
- <el-form size="mini" :key="tableKey" style="margin-top: 1%;width: 98%;" :model="formAdd" label-position="right" ref="formRefAdd" label-width="120px" :rules="rulesAdd">
|
|
|
|
|
- <el-row :gutter="48">
|
|
|
|
|
- <el-col :span="10">
|
|
|
|
|
- <el-form-item label="服务名称:" prop="name" style="">
|
|
|
|
|
- <div style="display: flex;width: 100%;justify-content: space-between;">
|
|
|
|
|
- <el-input v-model="formAdd.name" style="width: 100%;"/>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="接口类型:" prop="" style="">
|
|
|
|
|
- <div style="display: flex;width: 100%;justify-content: space-between;">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="formAdd.type"
|
|
|
|
|
- :disabled="isEdit"
|
|
|
|
|
- style="width: 100%;margin-left: 0%;"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in optionsType"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- <div style="display: flex;">
|
|
|
|
|
-
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- <el-row :gutter="48">
|
|
|
|
|
- <el-col :span="10">
|
|
|
|
|
- <el-form-item label="接口地址:" prop="url" style="">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="formAdd.url"
|
|
|
|
|
- style="width: 100%;"
|
|
|
|
|
- placeholder=""
|
|
|
|
|
- class="input-with-select"
|
|
|
|
|
- >
|
|
|
|
|
- </el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="请求方式:" prop="" style="">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="formAdd.rqtype"
|
|
|
|
|
- :disabled="isEdit"
|
|
|
|
|
- style="width: 100%;margin-left: 0%;"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in optionsRqtype"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- <el-row :gutter="48">
|
|
|
|
|
- <el-col :span="10">
|
|
|
|
|
- <el-form-item label="所属模型:" prop="mdid" style="">
|
|
|
|
|
- <el-tree-select
|
|
|
|
|
- v-model="formAdd.mdid"
|
|
|
|
|
- :data="optionsMdid"
|
|
|
|
|
- check-strictly
|
|
|
|
|
- :render-after-expand="false"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- />
|
|
|
|
|
- <!-- <el-select
|
|
|
|
|
- v-model="formAdd.mdid"
|
|
|
|
|
- style="width: 100%;margin-left: 0%;"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in optionsMdid"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.id"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select> -->
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- <el-form-item label="排序:" prop="dcSort">
|
|
|
|
|
- <el-input-number v-model="formAdd.sort" :min="1" style="width: 15%;"/>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-row :gutter="48">
|
|
|
|
|
- <el-col :span="10">
|
|
|
|
|
- <el-form-item label="响应类型:" prop="" style="display: flex; align-items: center;">
|
|
|
|
|
- <el-radio-group v-model="formAdd.rptype" class="ml-4" style="display: inline-flex; align-items: center;">
|
|
|
|
|
- <el-radio label="1" size="large" style="display: inline-flex; align-items: center;">
|
|
|
|
|
- <span style="position: relative; top: -1px">JSON</span> <!-- 微调文字位置 -->
|
|
|
|
|
- </el-radio>
|
|
|
|
|
- <el-radio label="2" size="large" style="display: inline-flex; align-items: center;">
|
|
|
|
|
- <span style="position: relative; top: -1px">XML</span>
|
|
|
|
|
- </el-radio>
|
|
|
|
|
- <el-radio label="3" size="large" style="display: inline-flex; align-items: center;">
|
|
|
|
|
- <span style="position: relative; top: -1px">HTML</span>
|
|
|
|
|
- </el-radio>
|
|
|
|
|
- </el-radio-group>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="服务分类:" prop="cateCode" style="">
|
|
|
|
|
- <el-cascader v-model="formAdd.cateCode" :options="cascaderOptions" :props="props1" clearable style="width: 100%;"></el-cascader>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <!-- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="请求方式:" prop="name" style="">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="formJi.type"
|
|
|
|
|
- :disabled="isEdit"
|
|
|
|
|
- style="width: 100%;margin-left: 0%;"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in optionsType"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
- </el-row>
|
|
|
|
|
- <el-row :gutter="48">
|
|
|
|
|
- <el-col :span="13">
|
|
|
|
|
- <el-form-item label="服务说明:">
|
|
|
|
|
- <el-input v-model="formAdd.intro" style="width: 100%;" :rows="3" resize="none" type="textarea"/>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
-
|
|
|
|
|
- </el-form>
|
|
|
|
|
- <div style="margin-top: 2%;">
|
|
|
|
|
- <div style="display: flex;justify-content: space-between;align-items: center;">
|
|
|
|
|
- <div>
|
|
|
|
|
- 请求参数
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="display: flex;justify-content: flex-end;margin-right: 2%;">
|
|
|
|
|
- <el-button @click="addCanAdd" style="margin-top: 1%;" type="success" size="mini" plain>新增参数</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <el-table
|
|
|
|
|
- style="margin-top: 1%;width: 98%;"
|
|
|
|
|
- :data="tableDataCanAdd"
|
|
|
|
|
- :cell-style="{ textAlign: 'center',padding:'2px 0' }"
|
|
|
|
|
- :header-cell-style="{ textAlign: 'center'}"
|
|
|
|
|
- :row-style="{ height: heightAll*0.01+'px',fontSize: '16px',textAlign:'center' }"
|
|
|
|
|
- border >
|
|
|
|
|
- <el-table-column prop="itemName" label="参数字段">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <div style="width: 100%;">
|
|
|
|
|
- <el-input placeholder="请填写参数编码" type="primary" class="noBor" v-model="scope.row.parCode" 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.parName" size="mini" text style="margin-left: 0%;"></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="itemName" label="参数类型" width="200">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <div style="width: 100%;">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="scope.row.parType"
|
|
|
|
|
- class="noBorSel"
|
|
|
|
|
- placeholder=""
|
|
|
|
|
- style="width: 100%;margin-left: 0%;"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in optionsCan"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="itemName" label="参数说明" >
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <div style="width: 100%;">
|
|
|
|
|
- <el-input type="primary" class="noBor" v-model="scope.row.parNote" size="mini" text style="margin-left: 0%;"></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="address" label="操作" width="100">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <div style="width: 100%;">
|
|
|
|
|
- <el-button type="danger" @click="delCanAdd(scope.$index)" size="mini" text style="margin-left: 0%;">删除</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
-
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="margin-top: 2%;">
|
|
|
|
|
- <!-- <div>返回响应</div> -->
|
|
|
|
|
- <div style="color: #909399;margin-left: 8%;margin-top:1%;">此处填写本服务接口响应信息描述</div>
|
|
|
|
|
- <el-tabs type="card" style="margin-top: -2%;width: 98%;">
|
|
|
|
|
- <el-tab-pane label="响应内容">
|
|
|
|
|
- <div style="display: flex; flex-direction: column;">
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-tab-pane>
|
|
|
|
|
- </el-tabs>
|
|
|
|
|
- <div style="overflow: auto;height: 20vh;margin-top: -1%;">
|
|
|
|
|
- <el-input placeholder="请输入示例" :rows="8" type="textarea" v-model="JsonAdd" size="mini" text style="margin-top: 0%;width: 98%;height: 99%;" ></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="margin-top: 2.5%;margin-left: 0%;padding-bottom: 1%;">
|
|
|
|
|
-
|
|
|
|
|
- <el-tabs type="card" style="margin-top: -1.5%;width: 98%;">
|
|
|
|
|
- <el-tab-pane label="使用说明">
|
|
|
|
|
-
|
|
|
|
|
- </el-tab-pane>
|
|
|
|
|
- </el-tabs>
|
|
|
|
|
- <el-input placeholder="请输入示例" :rows="8" type="textarea" v-model="exampleAdd" size="mini" text style="margin-top: -1%;width: 98%;" ></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <span class="dialog-footer">
|
|
|
|
|
- <el-button size="mini" @click="dialogVisible = false">取消</el-button>
|
|
|
|
|
- <el-button type="primary" @click="addSer" size="mini">
|
|
|
|
|
- 提交
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="name" label="服务名称" width="200">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="type" label="接口类型" width="200">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="url" label="接口地址" width="400" show-overflow-tooltip/>
|
|
|
|
|
+ <el-table-column prop="rqtype" label="请求方式" width="200"/>
|
|
|
|
|
+ <el-table-column prop="rptype" label="响应类型" width="150">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <div style="text-align: center;display: flex;" v-if="scope.row.rptype=='1'">
|
|
|
|
|
+ JSON
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="text-align: center;display: flex;" v-if="scope.row.rptype=='2'">
|
|
|
|
|
+ XML
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="text-align: center;display: flex;" v-if="scope.row.rptype=='3'">
|
|
|
|
|
+ HTML
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="cateCode" label="服务分类" width="140" show-overflow-tooltip>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="address" label="操作">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <div style="display: flex;justify-content: space-between;width: 100%;">
|
|
|
|
|
+ <!-- <el-button type="danger" text size="mini" style="margin-left: -5%;" @click="handleDelete(scope.row)">注销</el-button> -->
|
|
|
|
|
+ <el-button @click="showDe(scope.row)" type="primary" text size="mini" style="margin-left: 0%;">查看</el-button>
|
|
|
|
|
+ <el-button @click="testSer(scope.row)" type="primary" text size="mini" style="margin-left: 0%;">测试</el-button>
|
|
|
|
|
+ <el-button @click="testSer(scope.row)" type="primary" text size="mini" style="margin-left: 0%;">审核</el-button>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog @close="clearAdd" v-model="dialogVisible" title="" width="50%" destroy-on-close :key="tableKey">
|
|
|
|
|
+ <div style="display: flex;align-items: center;">
|
|
|
|
|
+ <div v-if="detailJson.rqtype==='GET'">
|
|
|
|
|
+ <el-tag class="ml-2" type="warning">GET</el-tag>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="detailJson.rqtype==='POST'">
|
|
|
|
|
+ <el-tag class="ml-2" type="warning">POST</el-tag>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="margin-left: 1%;">
|
|
|
|
|
+ {{ detailJson.name }}:
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="margin-left: 1%;">
|
|
|
|
|
+ {{ detailJson.url }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <span class="dialog-footer">
|
|
|
|
|
+ <el-button size="mini" @click="dialogVisible = false">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="addSer" size="mini">
|
|
|
|
|
+ 提交
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<el-dialog @close="clearFromLev" title="添加目录" v-model="dialogVisibleLevel" width="30%" destroy-on-close :key="tableKey">
|
|
<el-dialog @close="clearFromLev" title="添加目录" v-model="dialogVisibleLevel" width="30%" destroy-on-close :key="tableKey">
|
|
|
<el-form size="mini" :key="tableKey" style="margin-top: 1%;width: 90%;" :model="formLev" label-position="right" ref="formRefLev" label-width="120px" :rules="rulesLev">
|
|
<el-form size="mini" :key="tableKey" style="margin-top: 1%;width: 90%;" :model="formLev" label-position="right" ref="formRefLev" label-width="120px" :rules="rulesLev">
|
|
@@ -491,7 +166,7 @@
|
|
|
import {getCatalog} from "@/api/service/catalog";
|
|
import {getCatalog} from "@/api/service/catalog";
|
|
|
import { Plus,Search,Filter,Promotion,Check } from '@element-plus/icons-vue'
|
|
import { Plus,Search,Filter,Promotion,Check } from '@element-plus/icons-vue'
|
|
|
import { reactive } from 'vue'
|
|
import { reactive } from 'vue'
|
|
|
-import { modelTreeSelect,getSerDe,addService,addParam,editService,editParam,addServiceParam,delService,getTreeDe,addTree,deTree } from "@/api/service/info";
|
|
|
|
|
|
|
+import { modelTreeSelect,getSerDe,addService,addParam,editService,editParam,addServiceParam,delService,getTreeDe,addTree,deTree,getServiceInfo } from "@/api/service/info";
|
|
|
import { ref, onMounted, onUnmounted, nextTick,onBeforeMount } from 'vue';
|
|
import { ref, onMounted, onUnmounted, nextTick,onBeforeMount } from 'vue';
|
|
|
import JsonViewer from 'vue-json-viewer'
|
|
import JsonViewer from 'vue-json-viewer'
|
|
|
import 'vue-json-viewer/style.css'
|
|
import 'vue-json-viewer/style.css'
|
|
@@ -686,8 +361,8 @@ const cascaderOptions = ref([])
|
|
|
const props1 = ref({
|
|
const props1 = ref({
|
|
|
checkStrictly: true,
|
|
checkStrictly: true,
|
|
|
})
|
|
})
|
|
|
-const detailJson = ref([])
|
|
|
|
|
-
|
|
|
|
|
|
|
+const detailJson = ref('')
|
|
|
|
|
+const parOptions = ref([])
|
|
|
watch(inputNode, (val) => {
|
|
watch(inputNode, (val) => {
|
|
|
treeRef.value?.filter(val); // 调用树的过滤方法
|
|
treeRef.value?.filter(val); // 调用树的过滤方法
|
|
|
});
|
|
});
|
|
@@ -698,6 +373,14 @@ const filterNode = (value, data) => {
|
|
|
|
|
|
|
|
const copied = ref(false);
|
|
const copied = ref(false);
|
|
|
|
|
|
|
|
|
|
+function showDe(row){
|
|
|
|
|
+ getSerDe(row.srvId).then(res=>{
|
|
|
|
|
+ if(res.code===200){
|
|
|
|
|
+ detailJson.value = res.data.ptService
|
|
|
|
|
+ dialogVisible.value = true
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
async function copyUrl(){
|
|
async function copyUrl(){
|
|
|
try {
|
|
try {
|
|
|
await navigator.clipboard.writeText(detail.value.url);
|
|
await navigator.clipboard.writeText(detail.value.url);
|
|
@@ -898,29 +581,53 @@ function showAdd(){
|
|
|
dialogVisible.value = true
|
|
dialogVisible.value = true
|
|
|
}
|
|
}
|
|
|
async function handleNodeClick(node,data,event){
|
|
async function handleNodeClick(node,data,event){
|
|
|
- parTree.value = data.data
|
|
|
|
|
- currentNodeKey.value = data.data.id
|
|
|
|
|
- console.log(data.data.nodeType)
|
|
|
|
|
- isEdit.value = false
|
|
|
|
|
- parId.value = data.data
|
|
|
|
|
- await getSerDe(data.data.id).then(res=>{
|
|
|
|
|
- if(res.data.ptService){
|
|
|
|
|
- detail.value = res.data.ptService
|
|
|
|
|
- tableDataCan.value = res.data.list
|
|
|
|
|
- dataReturn.value = res.data.returnList
|
|
|
|
|
- console.log(tableDataCan.value)
|
|
|
|
|
- dataJsonXiang.value = res.data.ptService.rpcontent
|
|
|
|
|
- formJi.value = res.data.ptService
|
|
|
|
|
- example.value = res.data.ptService.example
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // parTree.value = data.data
|
|
|
|
|
+ // currentNodeKey.value = data.data.id
|
|
|
|
|
+
|
|
|
|
|
+ // isEdit.value = false
|
|
|
|
|
+ // parId.value = data.data
|
|
|
|
|
+ // await getSerDe(data.data.id).then(res=>{
|
|
|
|
|
+ // if(res.data.ptService){
|
|
|
|
|
+ // detail.value = res.data.ptService
|
|
|
|
|
+ // tableDataCan.value = res.data.list
|
|
|
|
|
+ // dataReturn.value = res.data.returnList
|
|
|
|
|
+ // console.log(tableDataCan.value)
|
|
|
|
|
+ // dataJsonXiang.value = res.data.ptService.rpcontent
|
|
|
|
|
+ // formJi.value = res.data.ptService
|
|
|
|
|
+ // example.value = res.data.ptService.example
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
|
|
+ // })
|
|
|
|
|
+ var par = {
|
|
|
|
|
+ mdid:data.data.id
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(data.data.id)
|
|
|
|
|
+ await getServiceInfo(par).then(res=>{
|
|
|
|
|
+ if(res.data){
|
|
|
|
|
+ tableData.value = res.data.serviceList
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
- detail.value.nodeType = data.data.nodeType
|
|
|
|
|
-
|
|
|
|
|
|
|
+ parOptions.value.forEach(option => {
|
|
|
|
|
+ option.label = option.cateName;
|
|
|
|
|
+ option.value = option.cateCode;
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log(parOptions.value)
|
|
|
|
|
+ for(var i = 0; i < parOptions.value.length; i++){
|
|
|
|
|
+ for(var i1 = 0; i1 < tableData.value.length; i1++){
|
|
|
|
|
+ console.log(i1);
|
|
|
|
|
+ if(parOptions.value[i].value === tableData.value[i1].cateCode){
|
|
|
|
|
+ tableData.value[i1].cateCode = parOptions.value[i].label
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
async function getTreeLeft(){
|
|
async function getTreeLeft(){
|
|
|
- var par
|
|
|
|
|
- await modelTreeSelect().then(res=>{
|
|
|
|
|
|
|
+ var par = {
|
|
|
|
|
+ params:{
|
|
|
|
|
+ level:'2'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ await modelTreeSelect(par).then(res=>{
|
|
|
par = res.data
|
|
par = res.data
|
|
|
data.value = res.data
|
|
data.value = res.data
|
|
|
|
|
|
|
@@ -957,6 +664,7 @@ function renameTreeProperties(tree) {
|
|
|
}
|
|
}
|
|
|
function fetchData() {
|
|
function fetchData() {
|
|
|
getCatalog().then((r) => {
|
|
getCatalog().then((r) => {
|
|
|
|
|
+ parOptions.value = r.data
|
|
|
cascaderOptions.value = renameTreeProperties(buildTree(r.data))
|
|
cascaderOptions.value = renameTreeProperties(buildTree(r.data))
|
|
|
console.log(cascaderOptions.value)
|
|
console.log(cascaderOptions.value)
|
|
|
});
|
|
});
|