CzRger 6 mesi fa
parent
commit
9dd779afd7

+ 4 - 0
src/components/cus/CusDialog.vue

@@ -16,6 +16,8 @@
       :before-close="beforeClose"
       :show-close="false"
       :append-to-body="$util.isValue($attrs.appendToBody) ? $attrs.appendToBody : true"
+      :close-on-click-modal="closeOnClickModal"
+      :close-on-press-escape="closeOnPressEscape"
   >
     <template #header>
       <div class="_cus-dialog-head" v-if="title">
@@ -79,6 +81,8 @@ export default defineComponent({
     height: {default: '60%'},
     maxHeight: {default: 'unset'},
     minHeight: {default: 'unset'},
+    closeOnClickModal: {default: false},
+    closeOnPressEscape: {default: false},
     closeConfirm: {default: false},
     closeConfirmText: {default: {
       title: null,

+ 6 - 6
src/views/manage/index/detail.vue

@@ -72,12 +72,12 @@
           link="select"
           :options="DictionaryStore.themeModeList"
         />
-        <CusFormColumn
-          :span="12"
-          :required="state.form.themeMode !== 'no_support'"
-          label="主题字段"
-          v-model:param="state.form.themeField"
-        />
+<!--        <CusFormColumn-->
+<!--          :span="12"-->
+<!--          :required="state.form.themeMode !== 'no_support'"-->
+<!--          label="主题字段"-->
+<!--          v-model:param="state.form.themeField"-->
+<!--        />-->
         <CusFormColumn
           :span="12"
           label="图模式卡片数"

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

@@ -56,7 +56,7 @@
         />
         <CusFormColumn
           :span="12"
-          :required="$util.isValue(state.form.relateIndexId)"
+          :required="$util.isValue(state.form.relateIndexId) || state.form.isMain == 1"
           label="节点权重"
           v-model:param="state.form.weight"
           link="select"

+ 3 - 2
src/views/web/archive/index.vue

@@ -104,11 +104,12 @@
 import {computed, getCurrentInstance, onMounted, reactive, watch} from "vue";
 import RelationChart from "./relation-chart.vue";
 import {ElLoading, ElMessage} from "element-plus";
-import {useThemeStore} from "@/stores";
+import {useAppStore, useThemeStore} from "@/stores";
 import {frontGetThemeByThemeId} from "@/api/modules/web/list";
 import {useRoute} from "vue-router";
 
 const ThemeStore = useThemeStore()
+const AppStore = useAppStore()
 const route = useRoute()
 const {proxy} = getCurrentInstance()
 const state: any = reactive({
@@ -213,7 +214,7 @@ const themeConfigCpt = computed(() => {
       res.chart.nodes.unshift({
         id: String(v.id),
         iconSrc: v.url,
-        weight: v.weight,
+        weight: v.weight || 100,
         num: 0,
         name: v.indexNameShort,
         indexTableName: v.indexTableName,

+ 1 - 0
src/views/web/archive/relation-chart.vue

@@ -38,6 +38,7 @@ const initChart = () => {
     const data = JSON.parse(JSON.stringify(props.data))
     setNodes(data)
     setEdges(data)
+    console.log(data)
     const mainColor = getComputedStyle(document.documentElement).getPropertyValue('--cus-main-color')
     const graph = new Graph({
       container: 'container',