CzRger 5 miesięcy temu
rodzic
commit
02cb21f5cc

+ 2 - 2
src/views/manage/index/text-detail.vue

@@ -15,13 +15,13 @@
           :span="12"
           required
           label="中文名称"
-          v-model:param="state.form.fieldNameCn"
+          v-model:param="state.form.fieldName"
         />
         <CusFormColumn
           :span="12"
           required
           label="英文定义"
-          v-model:param="state.form.fieldNameEn"
+          v-model:param="state.form.fieldKey"
         />
         <CusFormColumn
           :span="12"

+ 5 - 4
src/views/manage/index/text.vue

@@ -61,8 +61,8 @@ const state: any = reactive({
   query: {
     loading: false,
     tableHead: [
-      {value: "fieldNameCn", label: "中文名称", fixed: 'left', minWidth: 160},
-      {value: "fieldNameEn", label: "英文定义", fixed: 'left', minWidth: 160, popover: true},
+      {value: "fieldName", label: "中文名称", fixed: 'left', minWidth: 160},
+      {value: "fieldKey", label: "英文定义", fixed: 'left', minWidth: 160, popover: true},
       {value: "fieldType", label: "字段类型", fixed: 'left', minWidth: 160},
       {value: "dataOrder", label: "排序", minWidth: 100},
       {value: "searchWeight", label: "搜索权重", minWidth: 100},
@@ -87,7 +87,8 @@ const state: any = reactive({
 const initText = () => {
   state.query.loading = true
   sysIndexFieldList(proxy.$util.formatGetParam({
-    indexId: props.transfer.id
+    indexId: props.transfer.id,
+    type: 'inner_index'
   })).then(res => {
     state.query.result.data = res.data
     state.query.loading = false
@@ -112,7 +113,7 @@ const onEdit = (row) => {
   state.detail.show = true
 }
 const onDel = (row) => {
-  ElMessageBox.confirm(`请确认是否删除${row.fieldNameCn}?`, "提示", {
+  ElMessageBox.confirm(`请确认是否删除${row.fieldName}?`, "提示", {
     confirmButtonText: "确定",
     cancelButtonText: "取消",
     type: "warning",

+ 4 - 3
src/views/manage/index/theme.vue

@@ -36,8 +36,8 @@
                 v-model:param="scope.row.fieldParam"
                 link="select"
                 :options="state.textOptions"
-                label-key="fieldNameCn"
-                value-key="fieldNameEn"
+                label-key="fieldName"
+                value-key="fieldKey"
               />
             </template>
           </CusTable>
@@ -126,7 +126,8 @@ const handleSelect = (obj) => {
 }
 const initText = () => {
   sysIndexFieldList(proxy.$util.formatGetParam({
-    indexId: props.transfer.row.id
+    indexId: props.transfer.row.id,
+    type: 'inner_index'
   })).then(res => {
     state.textOptions = res.data
   })

+ 1 - 1
src/views/manage/service/complex-params.vue

@@ -107,7 +107,7 @@ const state: any = reactive({
     tableHead: [
       {value: "key", label: "键名"},
       {value: "type", label: "类型", width: 160},
-      {value: "value", label: `取值(动态取值:\$['变量名'])`},
+      {value: "value", label: `取值(动态取值:\${变量名})`},
       {value: "label", label: "含义"},
       {value: "do", label: "操作", width: 120, fixed: 'right'},
     ],

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

@@ -550,7 +550,7 @@ const state: any = reactive({
       tableHead: [
         {value: "key", label: "键名"},
         {value: "type", label: "类型", width: 160},
-        {value: "value", label: `取值(动态取值:\$['变量名'])`},
+        {value: "value", label: `取值(动态取值:\${变量名})`},
         {value: "label", label: "含义"},
         {value: "do", label: "操作", width: 120, fixed: 'right'},
       ],
@@ -560,7 +560,7 @@ const state: any = reactive({
       tableHead: [
         {value: "key", label: "键名"},
         {value: "type", label: "类型", width: 160},
-        {value: "value", label: `取值(动态取值:\$['变量名'])`},
+        {value: "value", label: `取值(动态取值:\${变量名})`},
         {value: "label", label: "含义"},
         {value: "do", label: "操作", width: 120, fixed: 'right'},
       ],
@@ -572,7 +572,7 @@ const state: any = reactive({
       tableHead: [
         {value: "key", label: "键名"},
         {value: "type", label: "类型", width: 160},
-        {value: "value", label: `取值(动态取值:\$['变量名'])`},
+        {value: "value", label: `取值(动态取值:\${变量名})`},
         {value: "label", label: "含义"},
         {value: "do", label: "操作", width: 120, fixed: 'right'},
       ],

+ 5 - 3
src/views/manage/theme/relation-column.vue

@@ -57,8 +57,8 @@ const state: any = reactive({
   query: {
     loading: false,
     tableHead: [
-      {value: "fieldNameCn", label: "列名称"},
-      {value: "fieldNameEn", label: "列英文名称"},
+      {value: "fieldName", label: "列名称"},
+      {value: "fieldKey", label: "列英文名称"},
       {value: "sort", label: "排序"},
       {value: "searchShow", label: "展示"},
     ],
@@ -71,7 +71,8 @@ const state: any = reactive({
 const initText = () => {
   state.query.loading = true
   sysIndexFieldList(proxy.$util.formatGetParam({
-    indexId: props.transfer.indexId
+    indexId: props.transfer.indexId,
+    type: 'inner_index'
   })).then(res => {
     state.query.result.data = res.data
     state.query.result.defaultShowIds = state.query.result.data.filter(v => v.searchShow == 1).map(v => v.id)
@@ -84,6 +85,7 @@ const initRelation = () => {
   sysThemeIndexGetIndexFields(proxy.$util.formatGetParam({
     themeId: props.transfer.themeId,
     indexId: props.transfer.indexId,
+    type: props.transfer.type,
   })).then(res => {
     state.query.result.data.forEach(v => {
       v.searchShow = res.data.some(s => s.fieldId == v.id) ? '1' : '0'

+ 14 - 13
src/views/manage/theme/relation-detail.vue

@@ -43,8 +43,8 @@
           v-model:param="state.form.mainField"
           link="select"
           :options="state.textOptions"
-          label-key="fieldNameCn"
-          value-key="fieldNameEn"
+          label-key="fieldName"
+          value-key="fieldKey"
         />
         <CusFormColumn
           :span="12"
@@ -115,8 +115,8 @@
                   v-model:param="scope.row.indexParam"
                   link="select"
                   :options="state.textOptions"
-                  label-key="fieldNameCn"
-                  value-key="fieldNameEn"
+                  label-key="fieldName"
+                  value-key="fieldKey"
                 />
               </template>
               <template #condition-column-value="{scope}">
@@ -159,8 +159,8 @@
                   v-model:param="scope.row.sortParam"
                   link="select"
                   :options="state.textOptions"
-                  label-key="fieldNameCn"
-                  value-key="fieldNameEn"
+                  label-key="fieldName"
+                  value-key="fieldKey"
                 />
               </template>
               <template #sortType-column-value="{scope}">
@@ -305,7 +305,8 @@ const initText = (id) => {
   state.textOptions = []
   if (isIndexCpt.value) {
     sysIndexFieldList(proxy.$util.formatGetParam({
-      indexId: id
+      indexId: id,
+      type: 'inner_index'
     })).then(res => {
       state.textOptions = res.data
       state.loading = false
@@ -320,22 +321,22 @@ const initText = (id) => {
           if (p.type == 1) {
             p.json.data.forEach(v => {
               arr.push({
-                fieldNameCn: v.label,
-                fieldNameEn: v.key,
+                fieldName: v.label,
+                fieldKey: v.key,
               })
             })
           } else if (p.type == 2) {
             p.text.data.forEach(v => {
               arr.push({
-                fieldNameCn: v.label,
-                fieldNameEn: v.key,
+                fieldName: v.label,
+                fieldKey: v.key,
               })
             })
           } else if (p.type == 3) {
             p.other.data.forEach(v => {
               arr.push({
-                fieldNameCn: v.label,
-                fieldNameEn: v.key,
+                fieldName: v.label,
+                fieldKey: v.key,
               })
             })
           }

+ 7 - 6
src/views/manage/theme/relation-main.vue

@@ -88,10 +88,10 @@ const onSubmit = () => {
       state.loading = true
       const params = JSON.parse(JSON.stringify(state.form))
       params.otherParams = params.otherParams.map(v => {
-        const obj = state.textOptions.filter(t => t.fieldNameEn == v)[0]
+        const obj = state.textOptions.filter(t => t.fieldKey == v)[0]
         return {
-          label: obj.fieldNameCn,
-          value: obj.fieldNameEn
+          label: obj.fieldName,
+          value: obj.fieldKey
         }
       })
       sysThemeIndexMainConfig({
@@ -128,11 +128,12 @@ const initDetail = () => {
 }
 const initText = () => {
   sysIndexFieldList(proxy.$util.formatGetParam({
-    indexId: props.transfer.indexId
+    indexId: props.transfer.indexId,
+    type: 'inner_index'
   })).then(res => {
     state.textOptions = res.data.map(v => {
-      v.dictLabel = v.fieldNameCn
-      v.dictValue = v.fieldNameEn
+      v.dictLabel = v.fieldName
+      v.dictValue = v.fieldKey
       return v
     })
   })

+ 2 - 1
src/views/manage/theme/relation.vue

@@ -181,7 +181,8 @@ const onMain = (row) => {
 const onText = (row) => {
   state.relationColumn.transfer = {
     indexId: row.indexId,
-    themeId: props.transfer.id
+    themeId: props.transfer.id,
+    type: row.type
   }
   state.relationColumn.show = true
 }

+ 1 - 1
src/views/web/archive/index.vue

@@ -199,7 +199,7 @@ const themeConfigCpt = computed(() => {
   const getTableHead = (item) => {
     const arr = []
     item.indexFields.forEach(v => {
-      arr.push({value: v.fieldNameEn, label: v.fieldNameCn})
+      arr.push({value: v.fieldKey, label: v.fieldName})
     })
     return arr
   }

+ 2 - 2
src/views/web/list/index.vue

@@ -309,11 +309,11 @@ const tableConfigCpt = computed(() => {
   let cardImg = {}
   const detailConfig = []
   state.resultParams.indexConfig?.sysIndexFields?.forEach(v => {
-    const obj = {key: v.fieldNameCn, value: v.fieldNameEn, col: v.labelLength, isImg: v.pictureField == 1}
+    const obj = {key: v.fieldName, value: v.fieldKey, col: v.labelLength, isImg: v.pictureField == 1}
     detailConfig.push(obj)
     if (v.searchShow == 1) {
       listConfig.push(obj)
-      if (state.resultParams.indexConfig?.pictureField && (state.resultParams.indexConfig?.pictureField == v.fieldNameEn)) {
+      if (state.resultParams.indexConfig?.pictureField && (state.resultParams.indexConfig?.pictureField == v.fieldKey)) {
         cardImg = JSON.parse(JSON.stringify(obj))
       } else {
         cardConfig.push(obj)