Browse Source

放开text

CzRger 6 months ago
parent
commit
02e6c1f51d
1 changed files with 9 additions and 3 deletions
  1. 9 3
      src/views/manage/service/detail.vue

+ 9 - 3
src/views/manage/service/detail.vue

@@ -422,6 +422,7 @@
                     link="select"
                     :options="DictionaryStore.qzTypeList"
                     :clearable="false"
+                    :disabled="true"
                   />
                 </template>
                 <template #value-column-value="{scope}">
@@ -603,10 +604,12 @@ const state: any = reactive({
         tableHead: [
           {value: "label", label: "列名"},
           {value: "key", label: "键名"},
+          {value: "valueType", label: "取值类型", width: 160},
+          {value: "value", label: "取值规则"},
           {value: "formatType", label: "格式类型", width: 160},
           {value: "formatRule", label: "格式转换规则"},
         ],
-        data: [{label: '', key: '', formatType: '1', formatRule: ''}]
+        data: [{label: '', key: '', valueType: '2', value: '', formatType: '1', formatRule: ''}]
       },
       other: {
         plug: '',
@@ -822,9 +825,12 @@ 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 || []
+        state.params.responseBody.text.data = p.text.data || [{label: '', key: '', valueType: '2', value: '', formatType: '1', formatRule: ''}]
         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
@@ -940,7 +946,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: '', formatType: '1', formatRule: ''}]
+    state.params.responseBody.text.data = [{label: '', key: '', valueType: '2', value: '', formatType: '1', formatRule: ''}]
     state.params.responseBody.other.plug = ''
     state.params.responseBody.other.data = []
     if (props.transfer.mode !== 'add') {