|
@@ -277,9 +277,11 @@
|
|
|
<template v-if="state.params.responseBody.type == 1 || state.params.responseBody.type == 2">
|
|
|
<el-col :span="24">
|
|
|
<div class="tips">
|
|
|
- @代表返回的数据,如下返回结果,匹配总数为"<span style="color: var(--cus-main-color)">@.data.total</span>"
|
|
|
+ 1、<span style="color: var(--cus-main-color)">@</span>代表返回的数据,如下返回结果,匹配<span style="color: var(--cus-main-color)">总数</span>为"<span style="color: var(--cus-main-color)">@.data.total</span>"
|
|
|
<br/>
|
|
|
- {code: 200,data: {pageNum: 1, pageSize: 10, data: [], total: 0},msg: ''}
|
|
|
+ {code: 200,data: {pageNum: 1, pageSize: 10, data: [], <span style="color: var(--cus-main-color)">total</span>: 0},msg: ''}
|
|
|
+ <br/>
|
|
|
+ 2、如直接返回统计结果或文本信息,可用<span style="color: var(--cus-main-color)">@</span>直接代表数据体
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</template>
|
|
@@ -315,7 +317,7 @@
|
|
|
</CusForm>
|
|
|
<template v-if="state.params.responseBody.type == 1">
|
|
|
<div style="margin-bottom: 10px; display: flex">
|
|
|
- <CusButton type="main" title="新增" style="margin-right: auto;" @click="state.params.responseBody.json.data.push({label: '', key: '', valueType: '1', value: '', formatType: '1', formatRule: ''})"/>
|
|
|
+ <CusButton type="main" title="新增" style="margin-right: auto;" @click="state.params.responseBody.json.data.push({label: '', key: '', valueType: '2', value: '', formatType: '1', formatRule: ''})"/>
|
|
|
<div class="tips" style="margin-left: 10px">
|
|
|
取值类型为JsonPath时,@代表返回的数据(逻辑同上),也可以直接写$['字段名']进行匹配
|
|
|
</div>
|
|
@@ -411,91 +413,95 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-if="state.params.responseBody.type == 2">
|
|
|
- <CusTable
|
|
|
- :data="state.params.responseBody.text.data"
|
|
|
- :table-head="state.params.responseBody.text.tableHead"
|
|
|
- :no-page="true"
|
|
|
- >
|
|
|
- <template #label-column-value="{scope}">
|
|
|
- <CusFormColumn
|
|
|
- class="__cus-table-form-column"
|
|
|
- :span="24"
|
|
|
- v-model:param="scope.row.label"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template #key-column-value="{scope}">
|
|
|
- <CusFormColumn
|
|
|
- class="__cus-table-form-column"
|
|
|
- :span="24"
|
|
|
- v-model:param="scope.row.key"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template #valueType-column-value="{scope}">
|
|
|
- <CusFormColumn
|
|
|
- class="__cus-table-form-column"
|
|
|
- :span="24"
|
|
|
- v-model:param="scope.row.valueType"
|
|
|
- link="select"
|
|
|
- :options="DictionaryStore.qzTypeList"
|
|
|
- :clearable="false"
|
|
|
- :disabled="true"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template #value-column-value="{scope}">
|
|
|
- <CusFormColumn
|
|
|
- class="__cus-table-form-column"
|
|
|
- :span="24"
|
|
|
- v-model:param="scope.row.value"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template #formatType-column-value="{scope}">
|
|
|
- <CusFormColumn
|
|
|
- class="__cus-table-form-column"
|
|
|
- :span="24"
|
|
|
- v-model:param="scope.row.formatType"
|
|
|
- link="select"
|
|
|
- :options="DictionaryStore.formatTypeList"
|
|
|
- :clearable="false"
|
|
|
- @change="scope.row.formatRule = ''"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template #formatRule-column-value="{scope}">
|
|
|
- <template v-if="scope.row.formatType == 1">
|
|
|
- <!-- <CusFormColumn-->
|
|
|
- <!-- class="__cus-table-form-column"-->
|
|
|
- <!-- :span="24"-->
|
|
|
- <!-- v-model:param="scope.row.formatRule"-->
|
|
|
- <!-- />-->
|
|
|
+ <div style="margin-bottom: 10px; display: flex">
|
|
|
+ <CusButton type="main" title="新增" style="margin-right: auto;" @click="state.params.responseBody.text.data.push({label: '', key: '', valueType: '2', value: '', formatType: '1', formatRule: ''})"/>
|
|
|
+ </div>
|
|
|
+ <div style="flex: 1;overflow: hidden;">
|
|
|
+ <CusTable
|
|
|
+ :data="state.params.responseBody.text.data"
|
|
|
+ :table-head="state.params.responseBody.text.tableHead"
|
|
|
+ :no-page="true"
|
|
|
+ >
|
|
|
+ <template #label-column-value="{scope}">
|
|
|
+ <CusFormColumn
|
|
|
+ class="__cus-table-form-column"
|
|
|
+ :span="24"
|
|
|
+ v-model:param="scope.row.label"
|
|
|
+ />
|
|
|
</template>
|
|
|
- <template v-else-if="scope.row.formatType == 2">
|
|
|
+ <template #key-column-value="{scope}">
|
|
|
<CusFormColumn
|
|
|
class="__cus-table-form-column"
|
|
|
:span="24"
|
|
|
- v-model:param="scope.row.formatRule"
|
|
|
+ v-model:param="scope.row.key"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #valueType-column-value="{scope}">
|
|
|
+ <CusFormColumn
|
|
|
+ class="__cus-table-form-column"
|
|
|
+ :span="24"
|
|
|
+ v-model:param="scope.row.valueType"
|
|
|
link="select"
|
|
|
- static
|
|
|
- :options="[
|
|
|
- {dictLabel: 'yyyy', dictValue: 'yyyy'},
|
|
|
- {dictLabel: 'yyyy-MM', dictValue: 'yyyy-MM'},
|
|
|
- {dictLabel: 'yyyy-MM-dd', dictValue: 'yyyy-MM-dd'},
|
|
|
- {dictLabel: 'yyyy-MM-dd HH', dictValue: 'yyyy-MM-dd HH'},
|
|
|
- {dictLabel: 'yyyy-MM-dd HH:mm', dictValue: 'yyyy-MM-dd HH:mm'},
|
|
|
- {dictLabel: 'yyyy-MM-dd HH:mm:ss', dictValue: 'yyyy-MM-dd HH:mm:ss'},
|
|
|
- ]"
|
|
|
+ :options="DictionaryStore.qzTypeList"
|
|
|
:clearable="false"
|
|
|
/>
|
|
|
</template>
|
|
|
- <template v-else-if="scope.row.formatType == 3">
|
|
|
+ <template #value-column-value="{scope}">
|
|
|
<CusFormColumn
|
|
|
class="__cus-table-form-column"
|
|
|
:span="24"
|
|
|
- v-model:param="scope.row.formatRule"
|
|
|
- :readonly="true"
|
|
|
- @click="onClickFormatRuleDictText(scope.row, scope.$index)"
|
|
|
+ v-model:param="scope.row.value"
|
|
|
/>
|
|
|
</template>
|
|
|
- </template>
|
|
|
- </CusTable>
|
|
|
+ <template #formatType-column-value="{scope}">
|
|
|
+ <CusFormColumn
|
|
|
+ class="__cus-table-form-column"
|
|
|
+ :span="24"
|
|
|
+ v-model:param="scope.row.formatType"
|
|
|
+ link="select"
|
|
|
+ :options="DictionaryStore.formatTypeList"
|
|
|
+ :clearable="false"
|
|
|
+ @change="scope.row.formatRule = ''"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #formatRule-column-value="{scope}">
|
|
|
+ <template v-if="scope.row.formatType == 1">
|
|
|
+ <!-- <CusFormColumn-->
|
|
|
+ <!-- class="__cus-table-form-column"-->
|
|
|
+ <!-- :span="24"-->
|
|
|
+ <!-- v-model:param="scope.row.formatRule"-->
|
|
|
+ <!-- />-->
|
|
|
+ </template>
|
|
|
+ <template v-else-if="scope.row.formatType == 2">
|
|
|
+ <CusFormColumn
|
|
|
+ class="__cus-table-form-column"
|
|
|
+ :span="24"
|
|
|
+ v-model:param="scope.row.formatRule"
|
|
|
+ link="select"
|
|
|
+ static
|
|
|
+ :options="[
|
|
|
+ {dictLabel: 'yyyy', dictValue: 'yyyy'},
|
|
|
+ {dictLabel: 'yyyy-MM', dictValue: 'yyyy-MM'},
|
|
|
+ {dictLabel: 'yyyy-MM-dd', dictValue: 'yyyy-MM-dd'},
|
|
|
+ {dictLabel: 'yyyy-MM-dd HH', dictValue: 'yyyy-MM-dd HH'},
|
|
|
+ {dictLabel: 'yyyy-MM-dd HH:mm', dictValue: 'yyyy-MM-dd HH:mm'},
|
|
|
+ {dictLabel: 'yyyy-MM-dd HH:mm:ss', dictValue: 'yyyy-MM-dd HH:mm:ss'},
|
|
|
+ ]"
|
|
|
+ :clearable="false"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template v-else-if="scope.row.formatType == 3">
|
|
|
+ <CusFormColumn
|
|
|
+ class="__cus-table-form-column"
|
|
|
+ :span="24"
|
|
|
+ v-model:param="scope.row.formatRule"
|
|
|
+ :readonly="true"
|
|
|
+ @click="onClickFormatRuleDictText(scope.row, scope.$index)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </CusTable>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<template v-if="state.params.responseBody.type == 3">
|
|
|
<div style="margin-bottom: 10px; display: flex">
|
|
@@ -835,12 +841,9 @@ const initDetail = () => {
|
|
|
state.params.responseBody.type = p.type
|
|
|
state.params.responseBody.json.pathForm = p.json.pathForm
|
|
|
state.params.responseBody.json.data = p.json.data || []
|
|
|
- state.params.responseBody.text.data = p.text.data || [{label: '', key: '', valueType: '2', value: '', formatType: '1', formatRule: ''}]
|
|
|
+ state.params.responseBody.text.data = p.text.data || []
|
|
|
state.params.responseBody.other.plug = p.other.plug
|
|
|
state.params.responseBody.other.data = p.other.data || []
|
|
|
- if (state.params.responseBody.text.data?.[0].valueType != '2') {
|
|
|
- state.params.responseBody.text.data[0].valueType = '2'
|
|
|
- }
|
|
|
} catch (e) {}
|
|
|
}
|
|
|
state.loading = false
|
|
@@ -958,7 +961,7 @@ watch(() => props.show, (n) => {
|
|
|
state.params.responseBody.type = '1'
|
|
|
state.params.responseBody.json.pathForm = {}
|
|
|
state.params.responseBody.json.data = []
|
|
|
- state.params.responseBody.text.data = [{label: '', key: '', valueType: '2', value: '', formatType: '1', formatRule: ''}]
|
|
|
+ state.params.responseBody.text.data = []
|
|
|
state.params.responseBody.other.plug = ''
|
|
|
state.params.responseBody.other.data = []
|
|
|
if (props.transfer.mode !== 'add') {
|