Commit 95205557bb942714d0d9c66dea0198d35bf48a0b

Authored by ww
1 parent a0299143

style: 格式化代码

Showing 57 changed files with 70 additions and 119 deletions
@@ -25,7 +25,7 @@ module.exports = defineConfig({ @@ -25,7 +25,7 @@ module.exports = defineConfig({
25 'plugin:jest/recommended', 25 'plugin:jest/recommended',
26 ], 26 ],
27 rules: { 27 rules: {
28 - 'no-console': 'error', 28 + 'no-console': ['error', { allow: ['warn', 'error'] }],
29 'vue/script-setup-uses-vars': 'error', 29 'vue/script-setup-uses-vars': 'error',
30 '@typescript-eslint/ban-ts-ignore': 'off', 30 '@typescript-eslint/ban-ts-ignore': 'off',
31 '@typescript-eslint/explicit-function-return-type': 'off', 31 '@typescript-eslint/explicit-function-return-type': 'off',
@@ -14,7 +14,6 @@ export function saveMenuApi( @@ -14,7 +14,6 @@ export function saveMenuApi(
14 update = false, 14 update = false,
15 mode: ErrorMessageMode = 'modal' 15 mode: ErrorMessageMode = 'modal'
16 ) { 16 ) {
17 - console.log(params);  
18 if (!update) { 17 if (!update) {
19 return defHttp.post<MenuOperationApiResult>( 18 return defHttp.post<MenuOperationApiResult>(
20 { 19 {
@@ -48,13 +48,21 @@ @@ -48,13 +48,21 @@
48 <template #content> 48 <template #content>
49 <section class="flex flex-wrap w-36"> 49 <section class="flex flex-wrap w-36">
50 <table class="border-collapse" @click="handleSelectConfirm"> 50 <table class="border-collapse" @click="handleSelectConfirm">
51 - <tr v-for="row in MAX_ROW" :key="row" class="border border-gray-300 border-solid"> 51 + <tr
  52 + v-for="rowNumber in MAX_ROW"
  53 + :key="rowNumber"
  54 + class="border border-gray-300 border-solid"
  55 + >
52 <td 56 <td
53 - v-for="col in MAX_COL"  
54 - :class="selectedLayout.col >= col && selectedLayout.row >= row ? 'bg-blue-500' : ''"  
55 - :key="col" 57 + v-for="colNumber in MAX_COL"
  58 + :class="
  59 + selectedLayout.col >= colNumber && selectedLayout.row >= rowNumber
  60 + ? 'bg-blue-500'
  61 + : ''
  62 + "
  63 + :key="colNumber"
56 class="w-4 h-4 border border-gray-300 border-solid cursor-pointer" 64 class="w-4 h-4 border border-gray-300 border-solid cursor-pointer"
57 - @mouseover="handleOver(row, col)" 65 + @mouseover="handleOver(rowNumber, colNumber)"
58 > 66 >
59 </td> 67 </td>
60 </tr> 68 </tr>
@@ -77,7 +77,6 @@ @@ -77,7 +77,6 @@
77 try { 77 try {
78 const data = e.target && e.target.result; 78 const data = e.target && e.target.result;
79 const workbook = XLSX.read(data, { type: 'array' }); 79 const workbook = XLSX.read(data, { type: 'array' });
80 - // console.log(workbook);  
81 /* DO SOMETHING WITH workbook HERE */ 80 /* DO SOMETHING WITH workbook HERE */
82 const excelData = getExcelData(workbook); 81 const excelData = getExcelData(workbook);
83 emit('success', excelData); 82 emit('success', excelData);
@@ -90,7 +90,7 @@ @@ -90,7 +90,7 @@
90 () => { 90 () => {
91 !unref(isFirstLoad) && fetch(); 91 !unref(isFirstLoad) && fetch();
92 }, 92 },
93 - { deep: true }, 93 + { deep: true }
94 ); 94 );
95 95
96 async function fetch() { 96 async function fetch() {
@@ -110,6 +110,7 @@ @@ -110,6 +110,7 @@
110 } 110 }
111 emitChange(); 111 emitChange();
112 } catch (error) { 112 } catch (error) {
  113 + // eslint-disable-next-line no-console
113 console.warn(error); 114 console.warn(error);
114 } finally { 115 } finally {
115 loading.value = false; 116 loading.value = false;
@@ -156,6 +156,7 @@ @@ -156,6 +156,7 @@
156 } 156 }
157 emitChange(); 157 emitChange();
158 } catch (error) { 158 } catch (error) {
  159 + // eslint-disable-next-line no-console
159 console.warn(error); 160 console.warn(error);
160 } finally { 161 } finally {
161 loading.value = false; 162 loading.value = false;
@@ -113,7 +113,7 @@ @@ -113,7 +113,7 @@
113 const { TabPane } = Tabs; 113 const { TabPane } = Tabs;
114 const { prefixCls } = useDesign('easy-cron-inner'); 114 const { prefixCls } = useDesign('easy-cron-inner');
115 provide('prefixCls', prefixCls); 115 provide('prefixCls', prefixCls);
116 - const emit = defineEmits([...cronEmits]); 116 + const emit = defineEmits(cronEmits);
117 const props = defineProps({ ...cronProps }); 117 const props = defineProps({ ...cronProps });
118 const activeKey = ref(props.hideSecond ? 'minute' : 'second'); 118 const activeKey = ref(props.hideSecond ? 'minute' : 'second');
119 const second = ref('*'); 119 const second = ref('*');
@@ -236,7 +236,7 @@ @@ -236,7 +236,7 @@
236 if (/^[0-7]$/.test(week)) { 236 if (/^[0-7]$/.test(week)) {
237 return convert(week); 237 return convert(week);
238 } else if (patten1.test(week)) { 238 } else if (patten1.test(week)) {
239 - return week.replace(patten1, ($0, before, separator, after) => { 239 + return week.replace(patten1, (_$0, before, separator, after) => {
240 if (separator === '/') { 240 if (separator === '/') {
241 return convert(before) + separator + after; 241 return convert(before) + separator + after;
242 } else { 242 } else {
@@ -23,8 +23,8 @@ @@ -23,8 +23,8 @@
23 23
24 export default defineComponent({ 24 export default defineComponent({
25 name: 'EasyCronModal', 25 name: 'EasyCronModal',
26 - inheritAttrs: false,  
27 components: { BasicModal, EasyCron, Button }, 26 components: { BasicModal, EasyCron, Button },
  27 + inheritAttrs: false,
28 setup() { 28 setup() {
29 const attrs = useAttrs(); 29 const attrs = useAttrs();
30 const [registerModal, { closeModal }] = useModalInner(); 30 const [registerModal, { closeModal }] = useModalInner();
@@ -45,7 +45,7 @@ export function useTabSetup(props, context, options) { @@ -45,7 +45,7 @@ export function useTabSetup(props, context, options) {
45 45
46 // 根据不同的类型计算出的value 46 // 根据不同的类型计算出的value
47 const computeValue = computed(() => { 47 const computeValue = computed(() => {
48 - let valueArray: any[] = []; 48 + const valueArray: any[] = [];
49 switch (type.value) { 49 switch (type.value) {
50 case TypeEnum.unset: 50 case TypeEnum.unset:
51 valueArray.push('?'); 51 valueArray.push('?');
@@ -79,7 +79,7 @@ export function useTabSetup(props, context, options) { @@ -79,7 +79,7 @@ export function useTabSetup(props, context, options) {
79 }); 79 });
80 // 指定值范围区间,介于最小值和最大值之间 80 // 指定值范围区间,介于最小值和最大值之间
81 const specifyRange = computed(() => { 81 const specifyRange = computed(() => {
82 - let range: number[] = []; 82 + const range: number[] = [];
83 if (maxValue.value != null) { 83 if (maxValue.value != null) {
84 for (let i = minValue.value; i <= maxValue.value; i++) { 84 for (let i = minValue.value; i <= maxValue.value; i++) {
85 range.push(i); 85 range.push(i);
@@ -159,7 +159,7 @@ @@ -159,7 +159,7 @@
159 } 159 }
160 emit('height-change', unref(realHeightRef)); 160 emit('height-change', unref(realHeightRef));
161 } catch (error) { 161 } catch (error) {
162 - console.log(error); 162 + console.error(error);
163 } 163 }
164 } 164 }
165 165
@@ -207,7 +207,6 @@ @@ -207,7 +207,6 @@
207 }); 207 });
208 208
209 function handleSearch(searchValue: string) { 209 function handleSearch(searchValue: string) {
210 - console.log('searchValue', searchValue);  
211 if (searchValue !== searchText.value) searchText.value = searchValue; 210 if (searchValue !== searchText.value) searchText.value = searchValue;
212 emit('update:searchValue', searchValue); 211 emit('update:searchValue', searchValue);
213 if (!searchValue) { 212 if (!searchValue) {
@@ -202,7 +202,6 @@ @@ -202,7 +202,6 @@
202 error: null, 202 error: null,
203 }; 203 };
204 } catch (e) { 204 } catch (e) {
205 - console.log(e);  
206 item.status = UploadResultStatus.ERROR; 205 item.status = UploadResultStatus.ERROR;
207 return { 206 return {
208 success: false, 207 success: false,
@@ -16,8 +16,6 @@ @@ -16,8 +16,6 @@
16 import { computed, defineComponent, unref, ref } from 'vue'; 16 import { computed, defineComponent, unref, ref } from 'vue';
17 import { Layout } from 'ant-design-vue'; 17 import { Layout } from 'ant-design-vue';
18 18
19 - import { GithubFilled } from '@ant-design/icons-vue';  
20 -  
21 import { DOC_URL, GITHUB_URL, SITE_URL } from '/@/settings/siteSetting'; 19 import { DOC_URL, GITHUB_URL, SITE_URL } from '/@/settings/siteSetting';
22 import { openWindow } from '/@/utils'; 20 import { openWindow } from '/@/utils';
23 21
@@ -29,7 +27,7 @@ @@ -29,7 +27,7 @@
29 27
30 export default defineComponent({ 28 export default defineComponent({
31 name: 'LayoutFooter', 29 name: 'LayoutFooter',
32 - components: { Footer: Layout.Footer, GithubFilled }, 30 + components: { Footer: Layout.Footer },
33 setup() { 31 setup() {
34 const { t } = useI18n(); 32 const { t } = useI18n();
35 const { getShowFooter } = useRootSetting(); 33 const { getShowFooter } = useRootSetting();
@@ -148,7 +148,6 @@ @@ -148,7 +148,6 @@
148 148
149 function renderMenu() { 149 function renderMenu() {
150 const { menus, ...menuProps } = unref(getCommonProps); 150 const { menus, ...menuProps } = unref(getCommonProps);
151 - // console.log(menus);  
152 if (!menus || !menus.length) return null; 151 if (!menus || !menus.length) return null;
153 return !props.isHorizontal ? ( 152 return !props.isHorizontal ? (
154 <SimpleMenu {...menuProps} isSplitMenu={unref(getSplit)} items={menus} /> 153 <SimpleMenu {...menuProps} isSplitMenu={unref(getSplit)} items={menus} />
@@ -100,7 +100,7 @@ export default defineComponent({ @@ -100,7 +100,7 @@ export default defineComponent({
100 <> 100 <>
101 <TypePicker 101 <TypePicker
102 menuTypeList={menuTypeList} 102 menuTypeList={menuTypeList}
103 - handler={(item: typeof menuTypeList[0]) => { 103 + handler={(item: (typeof menuTypeList)[0]) => {
104 baseHandler(HandlerEnum.CHANGE_LAYOUT, { 104 baseHandler(HandlerEnum.CHANGE_LAYOUT, {
105 mode: item.mode, 105 mode: item.mode,
106 type: item.type, 106 type: item.type,
@@ -47,7 +47,7 @@ export function initAppConfigStore() { @@ -47,7 +47,7 @@ export function initAppConfigStore() {
47 grayMode && updateGrayMode(grayMode); 47 grayMode && updateGrayMode(grayMode);
48 colorWeak && updateColorWeak(colorWeak); 48 colorWeak && updateColorWeak(colorWeak);
49 } catch (error) { 49 } catch (error) {
50 - console.log(error); 50 + console.error(error);
51 } 51 }
52 appStore.setProjectConfig(projCfg); 52 appStore.setProjectConfig(projCfg);
53 53
@@ -4,7 +4,6 @@ import { defineStore } from 'pinia'; @@ -4,7 +4,6 @@ import { defineStore } from 'pinia';
4 4
5 import { LOCK_INFO_KEY } from '/@/enums/cacheEnum'; 5 import { LOCK_INFO_KEY } from '/@/enums/cacheEnum';
6 import { Persistent } from '/@/utils/cache/persistent'; 6 import { Persistent } from '/@/utils/cache/persistent';
7 -import { useUserStore } from './user';  
8 7
9 interface LockState { 8 interface LockState {
10 lockInfo: Nullable<LockInfo>; 9 lockInfo: Nullable<LockInfo>;
@@ -111,7 +111,6 @@ export const usePermissionStore = defineStore({ @@ -111,7 +111,6 @@ export const usePermissionStore = defineStore({
111 * 否则不是超级管理员-获取对应角色的权限列表 111 * 否则不是超级管理员-获取对应角色的权限列表
112 */ 112 */
113 const codeList = await getPermCode(); 113 const codeList = await getPermCode();
114 - // console.log('codeList', codeList);  
115 this.setPermCodeList(codeList); 114 this.setPermCodeList(codeList);
116 /** 115 /**
117 * 如果是超级管理员则获取对应权限列表 116 * 如果是超级管理员则获取对应权限列表
@@ -234,7 +234,6 @@ export const useUserStore = defineStore({ @@ -234,7 +234,6 @@ export const useUserStore = defineStore({
234 // try { 234 // try {
235 // await doLogout(); 235 // await doLogout();
236 // } catch { 236 // } catch {
237 - // console.log('注销Token失败');  
238 // } 237 // }
239 // this.resetState(); 238 // this.resetState();
240 // setAuthCache(JWT_TOKEN_KEY, undefined); 239 // setAuthCache(JWT_TOKEN_KEY, undefined);
@@ -85,9 +85,7 @@ @@ -85,9 +85,7 @@
85 /^[1](([3][0-9])|([4][0,1,4-9])|([5][0-3,5-9])|([6][2,5,6,7])|([7][0-8])|([8][0-9])|([9][0-3,5-9]))[0-9]{8}$/; 85 /^[1](([3][0-9])|([4][0,1,4-9])|([5][0-3,5-9])|([6][2,5,6,7])|([7][0-8])|([8][0-9])|([9][0-3,5-9]))[0-9]{8}$/;
86 if (reg.test(formData.mobile)) { 86 if (reg.test(formData.mobile)) {
87 const sendRes = await passwordResetCode(formData.mobile); 87 const sendRes = await passwordResetCode(formData.mobile);
88 - console.log(sendRes);  
89 if (sendRes === '') { 88 if (sendRes === '') {
90 - console.log('发送成功了');  
91 return true; 89 return true;
92 } 90 }
93 return false; 91 return false;
@@ -99,6 +99,5 @@ @@ -99,6 +99,5 @@
99 async function handleRegister() { 99 async function handleRegister() {
100 const data = await validForm(); 100 const data = await validForm();
101 if (!data) return; 101 if (!data) return;
102 - console.log(data);  
103 } 102 }
104 </script> 103 </script>
@@ -27,7 +27,6 @@ @@ -27,7 +27,6 @@
27 onMounted(() => { 27 onMounted(() => {
28 // 记录当前的UserId 28 // 记录当前的UserId
29 userId.value = userStore.getUserInfo?.userId; 29 userId.value = userStore.getUserInfo?.userId;
30 - console.log('Mounted', userStore.getUserInfo);  
31 }); 30 });
32 31
33 onBeforeUnmount(() => { 32 onBeforeUnmount(() => {
@@ -11,8 +11,7 @@ @@ -11,8 +11,7 @@
11 */ 11 */
12 export function simpleDebounce(fn, delay = 100) { 12 export function simpleDebounce(fn, delay = 100) {
13 let timer: any | null = null; 13 let timer: any | null = null;
14 - return function () {  
15 - let args = arguments; 14 + return function (...args) {
16 if (timer) { 15 if (timer) {
17 clearTimeout(timer); 16 clearTimeout(timer);
18 } 17 }
@@ -61,4 +60,3 @@ export function dateFormat(date, block) { @@ -61,4 +60,3 @@ export function dateFormat(date, block) {
61 }); 60 });
62 return format; 61 return format;
63 } 62 }
64 -  
@@ -36,7 +36,6 @@ export function checkStatus( @@ -36,7 +36,6 @@ export function checkStatus(
36 } 36 }
37 break; 37 break;
38 case 403: 38 case 403:
39 - // console.log('403', errMessage);  
40 // errMessage = t('sys.api.errMsg403'); 39 // errMessage = t('sys.api.errMsg403');
41 errMessage = errMessage; 40 errMessage = errMessage;
42 break; 41 break;
@@ -8,7 +8,6 @@ export function listToTree(lists: getMenuListResultModel): getMenuListResultMode @@ -8,7 +8,6 @@ export function listToTree(lists: getMenuListResultModel): getMenuListResultMode
8 lists.forEach((goods) => { 8 lists.forEach((goods) => {
9 goods['menuName'] = t(goods.meta.title); // 为goods添加属性menuName 9 goods['menuName'] = t(goods.meta.title); // 为goods添加属性menuName
10 10
11 - // console.log(goods.children?.length);  
12 if (goods.children?.length) { 11 if (goods.children?.length) {
13 listToTree(goods.children); 12 listToTree(goods.children);
14 // goods.children.forEach((goodChildren) => { 13 // goods.children.forEach((goodChildren) => {
@@ -102,8 +102,7 @@ @@ -102,8 +102,7 @@
102 avatar: [{ uid: buildUUID(), name: 'name', url: data.record.avatar } as FileItem], 102 avatar: [{ uid: buildUUID(), name: 'name', url: data.record.avatar } as FileItem],
103 }); 103 });
104 } 104 }
105 - const { avatar, ...params } = data.record;  
106 - console.log(avatar); 105 + const { ...params } = data.record;
107 await setFieldsValue({ ...params }); 106 await setFieldsValue({ ...params });
108 } else { 107 } else {
109 editId.value = ''; 108 editId.value = '';
@@ -337,7 +337,6 @@ @@ -337,7 +337,6 @@
337 } 337 }
338 }, 338 },
339 onDisconnected() { 339 onDisconnected() {
340 - console.log('断开连接了');  
341 close(); 340 close();
342 }, 341 },
343 }); 342 });
@@ -354,7 +354,6 @@ @@ -354,7 +354,6 @@
354 } 354 }
355 }, 355 },
356 onDisconnected() { 356 onDisconnected() {
357 - console.log('断开连接了');  
358 close(); 357 close();
359 }, 358 },
360 }); 359 });
@@ -75,9 +75,7 @@ export const formSchema: FormSchema[] = [ @@ -75,9 +75,7 @@ export const formSchema: FormSchema[] = [
75 } 75 }
76 }, 76 },
77 // showUploadList: true, 77 // showUploadList: true,
78 - onDownload(file) {  
79 - console.log(file);  
80 - }, 78 + onDownload() {},
81 onPreview: (fileList: FileItem) => { 79 onPreview: (fileList: FileItem) => {
82 createImgPreview({ imageList: [fileList.url!] }); 80 createImgPreview({ imageList: [fileList.url!] });
83 }, 81 },
@@ -192,7 +192,6 @@ @@ -192,7 +192,6 @@
192 getRestData.value = resp; 192 getRestData.value = resp;
193 commonRest(resp, jsonEditorRef.value?.setJsonValue); 193 commonRest(resp, jsonEditorRef.value?.setJsonValue);
194 } catch (e) { 194 } catch (e) {
195 - console.log(e);  
196 if (Object.prototype.toString.call(e) === '[object Object]') { 195 if (Object.prototype.toString.call(e) === '[object Object]') {
197 jsonEditorRef.value?.setJsonValue(e); 196 jsonEditorRef.value?.setJsonValue(e);
198 } else { 197 } else {
@@ -61,7 +61,7 @@ export const useUtils = () => { @@ -61,7 +61,7 @@ export const useUtils = () => {
61 } 61 }
62 } 62 }
63 } catch (e) { 63 } catch (e) {
64 - console.log(`Post没有传递params${e}`); 64 + console.error(`Post没有传递params${e}`);
65 } 65 }
66 return _result.join('&'); 66 return _result.join('&');
67 }; 67 };
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 ...basicProps, 10 ...basicProps,
11 value: { 11 value: {
12 required: true, 12 required: true,
  13 + type: Object,
13 }, 14 },
14 }); 15 });
15 16
@@ -100,11 +100,9 @@ @@ -100,11 +100,9 @@
100 const { send, close } = useWebSocket(state.server, { 100 const { send, close } = useWebSocket(state.server, {
101 onConnected() { 101 onConnected() {
102 send(state.sendValue); 102 send(state.sendValue);
103 - console.log('建立连接了');  
104 }, 103 },
105 onMessage(_, e) { 104 onMessage(_, e) {
106 const { data } = JSON.parse(e.data); 105 const { data } = JSON.parse(e.data);
107 - console.log('来新消息了', '---data---', data);  
108 const newArray: socketDataType[] = []; 106 const newArray: socketDataType[] = [];
109 for (const key in data) { 107 for (const key in data) {
110 const [time, value] = data[key].flat(1); 108 const [time, value] = data[key].flat(1);
@@ -134,7 +132,6 @@ @@ -134,7 +132,6 @@
134 }); 132 });
135 }, 133 },
136 onDisconnected() { 134 onDisconnected() {
137 - console.log('断开连接了');  
138 close(); 135 close();
139 }, 136 },
140 onError() { 137 onError() {
@@ -32,13 +32,12 @@ @@ -32,13 +32,12 @@
32 import { BasicTable, useTable, TableAction } from '/@/components/Table'; 32 import { BasicTable, useTable, TableAction } from '/@/components/Table';
33 import { Switch } from 'ant-design-vue'; 33 import { Switch } from 'ant-design-vue';
34 import { DeviceRecord } from '/@/api/device/model/deviceModel'; 34 import { DeviceRecord } from '/@/api/device/model/deviceModel';
35 - import { watch } from 'vue';  
36 import VideoModal from './videoModal.vue'; 35 import VideoModal from './videoModal.vue';
37 import { useModal } from '/@/components/Modal'; 36 import { useModal } from '/@/components/Modal';
38 import { onMounted } from 'vue'; 37 import { onMounted } from 'vue';
39 import { useMessage } from '/@/hooks/web/useMessage'; 38 import { useMessage } from '/@/hooks/web/useMessage';
40 39
41 - const props = defineProps({ 40 + defineProps({
42 fromId: { 41 fromId: {
43 type: String, 42 type: String,
44 default: '', 43 default: '',
@@ -49,13 +48,6 @@ @@ -49,13 +48,6 @@
49 }, 48 },
50 }); 49 });
51 50
52 - watch(  
53 - () => props,  
54 - () => {  
55 - console.log(props, 'props');  
56 - }  
57 - );  
58 -  
59 const [registerModal, { openModal }] = useModal(); 51 const [registerModal, { openModal }] = useModal();
60 52
61 const [registerTable, { setTableData, setProps, setSelectedRowKeys, reload }] = useTable({ 53 const [registerTable, { setTableData, setProps, setSelectedRowKeys, reload }] = useTable({
@@ -68,14 +60,10 @@ @@ -68,14 +60,10 @@
68 labelWidth: 120, 60 labelWidth: 120,
69 schemas: searchFormSchema, 61 schemas: searchFormSchema,
70 }, 62 },
71 - beforeFetch: (params) => {  
72 - console.log(params);  
73 - },  
74 useSearchForm: true, 63 useSearchForm: true,
75 }); 64 });
76 65
77 - const handleTurnVideo = async (checked: Boolean, record: Recordable) => {  
78 - console.log(checked, record, 'record'); 66 + const handleTurnVideo = async (checked: Boolean, _record: Recordable) => {
79 setProps({ 67 setProps({
80 loading: true, 68 loading: true,
81 }); 69 });
@@ -281,7 +269,6 @@ @@ -281,7 +269,6 @@
281 }); 269 });
282 270
283 const handlePlay = (record: Recordable) => { 271 const handlePlay = (record: Recordable) => {
284 - console.log(record);  
285 openModal(true, { 272 openModal(true, {
286 record, 273 record,
287 }); 274 });
@@ -346,7 +346,6 @@ export const schemas: FormSchema[] = [ @@ -346,7 +346,6 @@ export const schemas: FormSchema[] = [
346 return { 346 return {
347 onChange(value) { 347 onChange(value) {
348 const { updateSchema } = formActionType; 348 const { updateSchema } = formActionType;
349 - console.log(value);  
350 formModel.interval = ''; 349 formModel.interval = '';
351 updateSchema({ 350 updateSchema({
352 field: 'interval', 351 field: 'interval',
@@ -235,7 +235,6 @@ @@ -235,7 +235,6 @@
235 235
236 function loadDataSuccess(excelDataList: ExcelData[]) { 236 function loadDataSuccess(excelDataList: ExcelData[]) {
237 tableListRef.value = []; 237 tableListRef.value = [];
238 - console.log(excelDataList);  
239 for (const excelData of excelDataList) { 238 for (const excelData of excelDataList) {
240 const { 239 const {
241 header, 240 header,
@@ -294,9 +293,7 @@ @@ -294,9 +293,7 @@
294 }); 293 });
295 }; 294 };
296 //导入 295 //导入
297 - function handleImport() {  
298 - console.log('record');  
299 - } 296 + function handleImport() {}
300 function handleSuccess() { 297 function handleSuccess() {
301 reload(); 298 reload();
302 } 299 }
@@ -204,8 +204,7 @@ @@ -204,8 +204,7 @@
204 }); 204 });
205 flag && createMessage.info(flag?.message); 205 flag && createMessage.info(flag?.message);
206 } catch (msg) { 206 } catch (msg) {
207 - // eslint-disable-next-line no-console  
208 - console.log(msg, 'msg'); 207 + console.error(msg, 'msg');
209 } finally { 208 } finally {
210 closeLoading(); 209 closeLoading();
211 closeModal(); 210 closeModal();
@@ -96,7 +96,6 @@ @@ -96,7 +96,6 @@
96 render: (_, data: Bootstrap) => (data.notifIfDisabled ? '启用' : '禁用'), 96 render: (_, data: Bootstrap) => (data.notifIfDisabled ? '启用' : '禁用'),
97 }, 97 },
98 ]; 98 ];
99 - console.log(unref(getOtherSetting));  
100 const [registerOtherSettings] = useDescription({ 99 const [registerOtherSettings] = useDescription({
101 layout: 'vertical', 100 layout: 'vertical',
102 column: 2, 101 column: 2,
@@ -30,9 +30,7 @@ @@ -30,9 +30,7 @@
30 import { SelectTypes } from 'ant-design-vue/es/select'; 30 import { SelectTypes } from 'ant-design-vue/es/select';
31 31
32 const emit = defineEmits(['register', 'emitSelect']); 32 const emit = defineEmits(['register', 'emitSelect']);
33 - const [register] = useModalInner((data) => {  
34 - console.log(data);  
35 - }); 33 + const [register] = useModalInner(() => {});
36 const heightNum = ref(80); 34 const heightNum = ref(80);
37 const visible = ref(false); 35 const visible = ref(false);
38 const selectValue = ref('LwM2M'); 36 const selectValue = ref('LwM2M');
@@ -130,14 +130,13 @@ @@ -130,14 +130,13 @@
130 telemetry: [], 130 telemetry: [],
131 }); 131 });
132 132
133 - const [registerModel, { resetFields: resetObjectListValue, getFieldsValue: getObjectListValue }] =  
134 - useForm({  
135 - labelWidth: 100,  
136 - schemas: modelSchemas,  
137 - actionColOptions: {  
138 - span: 14,  
139 - },  
140 - }); 133 + const [registerModel, { resetFields: resetObjectListValue }] = useForm({
  134 + labelWidth: 100,
  135 + schemas: modelSchemas,
  136 + actionColOptions: {
  137 + span: 14,
  138 + },
  139 + });
141 const [ 140 const [
142 registerSettings, 141 registerSettings,
143 { 142 {
@@ -152,14 +151,13 @@ @@ -152,14 +151,13 @@
152 span: 14, 151 span: 14,
153 }, 152 },
154 }); 153 });
155 - const [registerDevice, { resetFields: resetDeviceValue, getFieldsValue: getDeviceValue }] =  
156 - useForm({  
157 - labelWidth: 100,  
158 - schemas: deviceSchemas,  
159 - actionColOptions: {  
160 - span: 14,  
161 - },  
162 - }); 154 + const [registerDevice, { resetFields: resetDeviceValue }] = useForm({
  155 + labelWidth: 100,
  156 + schemas: deviceSchemas,
  157 + actionColOptions: {
  158 + span: 14,
  159 + },
  160 + });
163 const [registerModal, { openModal }] = useModal(); 161 const [registerModal, { openModal }] = useModal();
164 162
165 const handleAdd = () => { 163 const handleAdd = () => {
@@ -205,10 +203,6 @@ @@ -205,10 +203,6 @@
205 }; 203 };
206 204
207 const getFormData = async () => { 205 const getFormData = async () => {
208 - const objectListVal = getObjectListValue();  
209 - const deviceVal = getDeviceValue();  
210 - console.log('第一个tab', objectListVal);  
211 - console.log('第四个tab', deviceVal);  
212 getBootStrapFormValue(); 206 getBootStrapFormValue();
213 const settingsVal = await settingsValidate(); 207 const settingsVal = await settingsValidate();
214 if (!settingsVal) return; 208 if (!settingsVal) return;
@@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
69 if (unref(copied)) createMessage.success('复制成功!'); 69 if (unref(copied)) createMessage.success('复制成功!');
70 else createMessage.error('复制失败!'); 70 else createMessage.error('复制失败!');
71 } catch (e) { 71 } catch (e) {
72 - console.log(e); 72 + console.error(e);
73 } 73 }
74 }; 74 };
75 75
@@ -172,8 +172,7 @@ export const formSchema: FormSchema[] = [ @@ -172,8 +172,7 @@ export const formSchema: FormSchema[] = [
172 const record = await findMessageConfig(params); 172 const record = await findMessageConfig(params);
173 return record.filter((item) => item.status === 1); 173 return record.filter((item) => item.status === 1);
174 } catch (error) { 174 } catch (error) {
175 - // eslint-disable-next-line no-console  
176 - console.log(error); 175 + console.error(error);
177 return []; 176 return [];
178 } 177 }
179 }, 178 },
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 checksumAlgorithm: value.checksumAlgorithm, 41 checksumAlgorithm: value.checksumAlgorithm,
42 }); 42 });
43 } catch (error) { 43 } catch (error) {
44 - console.log(error); 44 + console.error(error);
45 if ((error as { status: number }).status) { 45 if ((error as { status: number }).status) {
46 await deleteOtaPackage(id); 46 await deleteOtaPackage(id);
47 } 47 }
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 border-color: #6b7280; 6 border-color: #6b7280;
7 } 7 }
8 8
9 -.vue-flow__handle:hover{ 9 +.vue-flow__handle:hover {
10 background-color: #000; 10 background-color: #000;
11 } 11 }
12 12
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 } 15 }
16 16
17 .vue-flow__handle-left { 17 .vue-flow__handle-left {
18 - left: -12px; 18 + left: -12px;
19 } 19 }
20 20
21 .vue-flow__background.vue-flow__container { 21 .vue-flow__background.vue-flow__container {
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 stroke-width: 4; 32 stroke-width: 4;
33 stroke: gray; 33 stroke: gray;
34 transition: stroke-width 0.3s; 34 transition: stroke-width 0.3s;
35 -} 35 +}
36 36
37 .connection-focus { 37 .connection-focus {
38 stroke-width: 6; 38 stroke-width: 6;
@@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
44 } 44 }
45 45
46 /* 连接线移入放大效果 */ 46 /* 连接线移入放大效果 */
47 -.vue-flow__edge:hover > .vue-flow__edge-path { 47 +.vue-flow__edge:hover > .vue-flow__edge-path {
48 stroke-width: 6 !important; 48 stroke-width: 6 !important;
49 } 49 }
50 50
@@ -54,18 +54,19 @@ @@ -54,18 +54,19 @@
54 } 54 }
55 55
56 .vue-flow__edge:hover .vue-flow__edge-textbg { 56 .vue-flow__edge:hover .vue-flow__edge-textbg {
57 - transform: scale(1.1) 57 + transform: scale(1.1);
58 } 58 }
59 59
60 -.vue-flow__edge:hover .vue-flow__edge-text{  
61 - transform: scale(1.1) 60 +.vue-flow__edge:hover .vue-flow__edge-text {
  61 + transform: scale(1.1);
62 } 62 }
63 63
64 /* selection 选择框 */ 64 /* selection 选择框 */
65 -.vue-flow__nodesselection-rect, .vue-flow__selection{ 65 +.vue-flow__nodesselection-rect,
  66 +.vue-flow__selection {
66 border-width: 3px; 67 border-width: 3px;
67 } 68 }
68 69
69 -.vue-flow__nodesselection-rect { 70 +.vue-flow__nodesselection-rect {
70 pointer-events: none; 71 pointer-events: none;
71 } 72 }
@@ -236,7 +236,7 @@ @@ -236,7 +236,7 @@
236 // 设置输出值 236 // 设置输出值
237 outputEditor.value.set(result); 237 outputEditor.value.set(result);
238 } catch (e) { 238 } catch (e) {
239 - console.log(e); 239 + console.error(e);
240 const { createMessage } = useMessage(); 240 const { createMessage } = useMessage();
241 createMessage.error(e.toString()); 241 createMessage.error(e.toString());
242 } 242 }
@@ -85,9 +85,7 @@ @@ -85,9 +85,7 @@
85 /^[1](([3][0-9])|([4][0,1,4-9])|([5][0-3,5-9])|([6][2,5,6,7])|([7][0-8])|([8][0-9])|([9][0-3,5-9]))[0-9]{8}$/; 85 /^[1](([3][0-9])|([4][0,1,4-9])|([5][0-3,5-9])|([6][2,5,6,7])|([7][0-8])|([8][0-9])|([9][0-3,5-9]))[0-9]{8}$/;
86 if (reg.test(formData.mobile)) { 86 if (reg.test(formData.mobile)) {
87 const sendRes = await passwordResetCode(formData.mobile); 87 const sendRes = await passwordResetCode(formData.mobile);
88 - console.log(sendRes);  
89 if (sendRes === '') { 88 if (sendRes === '') {
90 - console.log('发送成功了');  
91 return true; 89 return true;
92 } 90 }
93 return false; 91 return false;
@@ -99,6 +99,5 @@ @@ -99,6 +99,5 @@
99 async function handleRegister() { 99 async function handleRegister() {
100 const data = await validForm(); 100 const data = await validForm();
101 if (!data) return; 101 if (!data) return;
102 - console.log(data);  
103 } 102 }
104 </script> 103 </script>
@@ -27,7 +27,6 @@ @@ -27,7 +27,6 @@
27 onMounted(() => { 27 onMounted(() => {
28 // 记录当前的UserId 28 // 记录当前的UserId
29 userId.value = userStore.getUserInfo?.userId; 29 userId.value = userStore.getUserInfo?.userId;
30 - console.log('Mounted', userStore.getUserInfo);  
31 }); 30 });
32 31
33 onBeforeUnmount(() => { 32 onBeforeUnmount(() => {
@@ -14,7 +14,6 @@ @@ -14,7 +14,6 @@
14 Reflect.deleteProperty(params, 'path'); 14 Reflect.deleteProperty(params, 'path');
15 15
16 const _path = Array.isArray(path) ? path.join('/') : path; 16 const _path = Array.isArray(path) ? path.join('/') : path;
17 - console.log(unref(currentRoute));  
18 if (_redirect_type === 'name') { 17 if (_redirect_type === 'name') {
19 replace({ 18 replace({
20 name: _path, 19 name: _path,
@@ -138,7 +138,6 @@ @@ -138,7 +138,6 @@
138 } 138 }
139 if (newFieldValue.codeTown == undefined) { 139 if (newFieldValue.codeTown == undefined) {
140 validateArray.push('prov'); 140 validateArray.push('prov');
141 - console.log(validateArray);  
142 } else { 141 } else {
143 const findExistIndex1 = validateArray.findIndex((o) => o == 'prov'); 142 const findExistIndex1 = validateArray.findIndex((o) => o == 'prov');
144 if (findExistIndex1 !== -1) { 143 if (findExistIndex1 !== -1) {
@@ -5,7 +5,8 @@ @@ -5,7 +5,8 @@
5 <Tabs.TabPane 5 <Tabs.TabPane
6 v-if=" 6 v-if="
7 isWhereAdmin == 'TENANT_ADMIN' || 7 isWhereAdmin == 'TENANT_ADMIN' ||
8 - (isWhereAdmin == 'SYS_ADMIN' || isWhereAdmin == 'CUSTOMER_USER') 8 + isWhereAdmin == 'SYS_ADMIN' ||
  9 + isWhereAdmin == 'CUSTOMER_USER'
9 " 10 "
10 key="企业信息" 11 key="企业信息"
11 tab="企业信息" 12 tab="企业信息"
@@ -264,7 +264,6 @@ @@ -264,7 +264,6 @@
264 setProps({ 264 setProps({
265 loading: true, 265 loading: true,
266 }); 266 });
267 - console.log(sendTime.value);  
268 let startTime = null; 267 let startTime = null;
269 let endTime = null; 268 let endTime = null;
270 if (sendTime.value.length > 0) { 269 if (sendTime.value.length > 0) {
@@ -49,6 +49,7 @@ @@ -49,6 +49,7 @@
49 font-size: 16px; 49 font-size: 16px;
50 font-weight: 500; 50 font-weight: 500;
51 } 51 }
  52 +
52 :deep(.vben-collapse-container__header) { 53 :deep(.vben-collapse-container__header) {
53 border-bottom: none; 54 border-bottom: none;
54 } 55 }
@@ -134,7 +134,7 @@ @@ -134,7 +134,7 @@
134 copyTransFun(data as any); 134 copyTransFun(data as any);
135 return data; 135 return data;
136 } catch (error) { 136 } catch (error) {
137 - console.log(error); 137 + console.error(error);
138 return []; 138 return [];
139 } 139 }
140 }, 140 },
@@ -77,7 +77,7 @@ @@ -77,7 +77,7 @@
77 copyTransFun(data as any); 77 copyTransFun(data as any);
78 return data; 78 return data;
79 } catch (error) { 79 } catch (error) {
80 - console.log(error); 80 + console.error(error);
81 return []; 81 return [];
82 } 82 }
83 }, 83 },
@@ -150,7 +150,6 @@ @@ -150,7 +150,6 @@
150 getIsSharePage, 150 getIsSharePage,
151 (value) => { 151 (value) => {
152 if (value) { 152 if (value) {
153 - console.log(unref(getDarkMode));  
154 const root = document.querySelector('#app'); 153 const root = document.querySelector('#app');
155 (root as HTMLDivElement).style.backgroundColor = 154 (root as HTMLDivElement).style.backgroundColor =
156 unref(getDarkMode) === ThemeEnum.LIGHT ? '#F5F5F5' : '#1b1b1b'; 155 unref(getDarkMode) === ThemeEnum.LIGHT ? '#F5F5F5' : '#1b1b1b';
@@ -32,7 +32,6 @@ app.ws.use( @@ -32,7 +32,6 @@ app.ws.use(
32 }); 32 });
33 ctx.websocket.send(data); 33 ctx.websocket.send(data);
34 } 34 }
35 - console.log(message);  
36 }); 35 });
37 }) 36 })
38 ); 37 );
@@ -59,5 +58,6 @@ app.use(router.allowedMethods()); @@ -59,5 +58,6 @@ app.use(router.allowedMethods());
59 app.use(koaStatic(path.join(__dirname))); 58 app.use(koaStatic(path.join(__dirname)));
60 59
61 app.listen(PORT, () => { 60 app.listen(PORT, () => {
  61 + // eslint-disable-next-line no-console
62 console.log(`Application started successfully: http://localhost:${PORT}`); 62 console.log(`Application started successfully: http://localhost:${PORT}`);
63 }); 63 });