|  | @@ -22,7 +22,21 @@
 | 
	
		
			
				|  |  |    </BasicTable>
 | 
	
		
			
				|  |  |    <DeviceModal @register="registerModal" @save-or-update="saveOrUpdateHandler" :showTab="false" :deviceType="deviceType" />
 | 
	
		
			
				|  |  |    <BasicModal @register="registerConfigModal" @ok="handleUpdate" title="配置文件编辑" defaultFullscreen>
 | 
	
		
			
				|  |  | -    <CodeEditor v-model:value="configJSON" />
 | 
	
		
			
				|  |  | +    <a-row class="h-full">
 | 
	
		
			
				|  |  | +      <a-col class="h-full" :span="12">
 | 
	
		
			
				|  |  | +        <CodeEditor class="h-100%" :value="configJSON" @change="editorChangeHandler" />
 | 
	
		
			
				|  |  | +      </a-col>
 | 
	
		
			
				|  |  | +      <a-col class="justify-center items-center" style="display: flex" :span="12">
 | 
	
		
			
				|  |  | +        <ModulePlain
 | 
	
		
			
				|  |  | +          :device-type="configJSON!.deviceType"
 | 
	
		
			
				|  |  | +          :module-data="configJSON!.moduleData"
 | 
	
		
			
				|  |  | +          :module-name="configJSON!.moduleName"
 | 
	
		
			
				|  |  | +          :show-style="configJSON!.showStyle"
 | 
	
		
			
				|  |  | +          :data="{}"
 | 
	
		
			
				|  |  | +          :visible="true"
 | 
	
		
			
				|  |  | +        />
 | 
	
		
			
				|  |  | +      </a-col>
 | 
	
		
			
				|  |  | +    </a-row>
 | 
	
		
			
				|  |  |    </BasicModal>
 | 
	
		
			
				|  |  |    <BasicModal @register="registerPageTypeModal" @ok="handleUpdatePageType" title="一键修改模块版本">
 | 
	
		
			
				|  |  |      <BasicForm @register="registerForm" />
 | 
	
	
		
			
				|  | @@ -48,13 +62,15 @@
 | 
	
		
			
				|  |  |    import _ from 'lodash';
 | 
	
		
			
				|  |  |    /** @ts-ignore-next-line */
 | 
	
		
			
				|  |  |    import helpContext from './types?raw';
 | 
	
		
			
				|  |  | +  import ModulePlain from './ModulePlain.vue';
 | 
	
		
			
				|  |  | +  import { Config } from './types';
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    const formData = reactive<any>({});
 | 
	
		
			
				|  |  |    const isUpdate = ref(false);
 | 
	
		
			
				|  |  |    const deviceType = ref('');
 | 
	
		
			
				|  |  |    const formSchemaData = ref(formSchema);
 | 
	
		
			
				|  |  |    // const pageType = ref('');
 | 
	
		
			
				|  |  | -  const configJSON = ref('');
 | 
	
		
			
				|  |  | +  const configJSON = ref<Config>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    provide('formSchema', formSchemaData);
 | 
	
		
			
				|  |  |    provide('isUpdate', isUpdate);
 | 
	
	
		
			
				|  | @@ -167,7 +183,7 @@
 | 
	
		
			
				|  |  |      try {
 | 
	
		
			
				|  |  |        saveOrUpdateHandler({
 | 
	
		
			
				|  |  |          id: formData.id,
 | 
	
		
			
				|  |  | -        ...JSON.parse(configJSON.value),
 | 
	
		
			
				|  |  | +        ...configJSON.value,
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |          .then(() => {
 | 
	
		
			
				|  |  |            message.success('保存成功');
 | 
	
	
		
			
				|  | @@ -239,6 +255,10 @@
 | 
	
		
			
				|  |  |        console.error(e);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  function editorChangeHandler(val) {
 | 
	
		
			
				|  |  | +    configJSON.value = JSON.parse(val);
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <style scoped lang="less">
 |