hrx před 2 roky
rodič
revize
dacc40a042

+ 0 - 1
src/components/Container/src/Adaptive.vue

@@ -129,7 +129,6 @@
       //
       onMounted(async () => {
         ready.value = false;
-
         await initSize();
         updateSize();
         updateScale();

+ 5 - 5
src/components/Table/src/hooks/useColumnsCache.ts

@@ -14,9 +14,9 @@ export function useColumnsCache(opt, setColumns, handleColumnFixed) {
   const { createMessage: $message } = useMessage();
   // 列表配置缓存key
   const cacheKey = computed(() => {
-    let { fullPath } = router.currentRoute.value;
+    const { fullPath } = router.currentRoute.value;
     let key = fullPath.replace(/[\/\\]/g, '_');
-    let cacheKey = table.getBindValues.value.tableSetting?.cacheKey;
+    const cacheKey = table.getBindValues.value.tableSetting?.cacheKey;
     if (cacheKey) {
       key += ':' + cacheKey;
     }
@@ -35,7 +35,7 @@ export function useColumnsCache(opt, setColumns, handleColumnFixed) {
       return;
     }
     isInit = true;
-    let columnCache = $ls.get(cacheKey.value);
+    const columnCache = $ls.get(cacheKey.value);
     if (columnCache && columnCache.checkedList) {
       const { checkedList, sortedList, sortableOrder, checkIndex } = columnCache;
       await nextTick();
@@ -64,7 +64,7 @@ export function useColumnsCache(opt, setColumns, handleColumnFixed) {
     const { fixedColumns } = columnCache;
     const columns = opt.plainOptions.value;
     for (const column of columns) {
-      let fixedCol = fixedColumns.find((fc) => fc.key === (column.key || column.dataIndex));
+      const fixedCol = fixedColumns.find((fc) => fc.key === (column.key || column.dataIndex));
       if (fixedCol) {
         await nextTick();
         handleColumnFixed(column, fixedCol.fixed);
@@ -77,7 +77,7 @@ export function useColumnsCache(opt, setColumns, handleColumnFixed) {
 
   /** 获取被固定的列 */
   function getFixedColumns() {
-    let fixedColumns: any[] = [];
+    const fixedColumns: any[] = [];
     const columns = opt.plainOptions.value;
     for (const column of columns) {
       if (fixedReg.test((column.fixed ?? '').toString())) {

+ 18 - 19
src/utils/index.ts

@@ -72,10 +72,10 @@ export function getDynamicProps<T, U>(props: T): Partial<U> {
  * @updateBy:zyf
  */
 export function getValueType(props, field) {
-  let formSchema = unref(unref(props)?.schemas);
+  const formSchema = unref(unref(props)?.schemas);
   let valueType = 'string';
   if (formSchema) {
-    let schema = formSchema.filter((item) => item.field === field)[0];
+    const schema = formSchema.filter((item) => item.field === field)[0];
     valueType = schema.componentProps && schema.componentProps.valueType ? schema.componentProps.valueType : valueType;
   }
   return valueType;
@@ -119,11 +119,11 @@ export const withInstall = <T>(component: T, alias?: string) => {
  * @param paraName
  */
 export function getUrlParam(paraName) {
-  let url = document.location.toString();
-  let arrObj = url.split('?');
+  const url = document.location.toString();
+  const arrObj = url.split('?');
 
   if (arrObj.length > 1) {
-    let arrPara = arrObj[1].split('&');
+    const arrPara = arrObj[1].split('&');
     let arr;
 
     for (let i = 0; i < arrPara.length; i++) {
@@ -162,7 +162,7 @@ export function sleep(ms: number, fn?: Fn) {
  * @returns {String} 替换后的字符串
  */
 export function replaceAll(text, checker, replacer) {
-  let lastText = text;
+  const lastText = text;
   text = text.replace(checker, replacer);
   if (lastText !== text) {
     return replaceAll(text, checker, replacer);
@@ -177,14 +177,14 @@ export function replaceAll(text, checker, replacer) {
 export function getQueryVariable(url) {
   if (!url) return;
 
-  var t,
+  let t,
     n,
     r,
     i = url.split('?')[1],
     s = {};
   (t = i.split('&')), (r = null), (n = null);
-  for (var o in t) {
-    var u = t[o].indexOf('=');
+  for (const o in t) {
+    const u = t[o].indexOf('=');
     u !== -1 && ((r = t[o].substr(0, u)), (n = t[o].substr(u + 1)), (s[r] = n));
   }
   return s;
@@ -207,7 +207,7 @@ export function showDealBtn(bpmStatus) {
  */
 export function numToUpper(value) {
   if (value != '') {
-    let unit = new Array('仟', '佰', '拾', '', '仟', '佰', '拾', '', '角', '分');
+    const unit = ['仟', '佰', '拾', '', '仟', '佰', '拾', '', '角', '分'];
     const toDx = (n) => {
       switch (n) {
         case '0':
@@ -232,10 +232,10 @@ export function numToUpper(value) {
           return '玖';
       }
     };
-    let lth = value.toString().length;
+    const lth = value.toString().length;
     value *= 100;
     value += '';
-    let length = value.length;
+    const length = value.length;
     if (lth <= 8) {
       let result = '';
       for (let i = 0; i < length; i++) {
@@ -293,7 +293,6 @@ export function importViewsFile(path): Promise<any> {
 }
 //update-end-author:taoyan date:2022-6-8 for:解决老的vue2动态导入文件语法 vite不支持的问题
 
-
 /**
  * 跳转至积木报表的 预览页面
  * @param url
@@ -302,15 +301,15 @@ export function importViewsFile(path): Promise<any> {
  */
 export function goJmReportViewPage(url, id, token) {
   // URL支持{{ window.xxx }}占位符变量
-  url = url.replace(/{{([^}]+)?}}/g, (_s1, s2) => eval(s2))
+  url = url.replace(/{{([^}]+)?}}/g, (_s1, s2) => eval(s2));
   if (url.includes('?')) {
-    url += '&'
+    url += '&';
   } else {
-    url += '?'
+    url += '?';
   }
-  url += `id=${id}`
-  url += `&token=${token}`
-  window.open(url)
+  url += `id=${id}`;
+  url += `&token=${token}`;
+  window.open(url);
 }
 
 // 防抖截流

+ 1 - 0
src/views/vent/deviceManager/comment/FormModal.vue

@@ -10,6 +10,7 @@
   </div>
 </template>
 <script lang="ts" setup>
+  import { message } from 'ant-design-vue';
   import { reject } from 'lodash';
   import { inject, nextTick, watch } from 'vue';
   import { BasicForm, useForm } from '/@/components/Form/index';

+ 4 - 3
src/views/vent/deviceManager/comment/NormalTable.vue

@@ -40,7 +40,7 @@
   import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
   import { useListPage } from '/@/hooks/system/useListPage';
   import { useMessage } from '/@/hooks/web/useMessage';
-  const $message = useMessage();
+  const { notification } = useMessage();
   const props = defineProps({
     columnsType: {
       type: String,
@@ -158,11 +158,12 @@
 
   const saveOrUpdateHandler = async (params) => {
     try {
-      await props.saveOrUpdate(params, isUpdate.value);
+      const res = await props.saveOrUpdate(params, isUpdate.value);
+      notification.success({ message: res });
       !props.showTab ? closeModal() : '';
       await doRequest(props.list, { confirm: false });
     } catch (error) {
-      $message.createMessage.error('保存失败,请联系管理员');
+      notification.error({ message: '保存失败,请联系管理员' });
     }
   };
 

+ 1 - 1
src/views/vent/deviceManager/comment/pointTabel/point.api.ts

@@ -14,7 +14,7 @@ enum Api {
   exportXls = '/sys/user/exportXls',
 
   workDeviceList = '/ventanaly-device/safety/managesysDevice/list',
-  workDeviceEdit = '/ventanaly-device/safety/managesysDevice/editlist',
+  workDeviceEdit = '/ventanaly-device/safety/managesysDevice/editlink',
 }
 /**
  * 导出api

+ 64 - 3
src/views/vent/deviceManager/comment/pointTabel/point.data.ts

@@ -1,5 +1,6 @@
 import { BasicColumn } from '/@/components/Table';
 import { deviceList, deviceId, getDeviceId } from './point.api';
+import { Input } from 'ant-design-vue';
 
 export const columns: BasicColumn[] = [
   {
@@ -62,12 +63,72 @@ export const deviceColumns: BasicColumn[] = [
 export const workFaceColumns: BasicColumn[] = [
   {
     title: '安装位置',
-    dataIndex: 'valuename',
+    dataIndex: 'devicePos',
     width: 100,
   },
   {
-    title: '序',
+    title: '序',
     width: 100,
-    dataIndex: 'valuecode',
+    dataIndex: 'sort',
+    edit: true,
+    editComponent: 'InputNumber',
+  },
+  {
+    title: '是否在关键通风路线上',
+    width: 100,
+    dataIndex: 'pathflag',
+    edit: true,
+    editComponent: 'Switch',
+    editValueMap: (value) => {
+      return value ? '是' : '否';
+    },
+  },
+  {
+    title: '传感器类型',
+    width: 100,
+    dataIndex: 'sensorType',
+    edit: true,
+    editComponent: 'Select',
+    editComponentProps: {
+      options: [
+        {
+          label: '多参',
+          value: '1',
+        },
+        {
+          label: '测风',
+          value: '2',
+        },
+      ],
+    },
+  },
+  {
+    title: '风向',
+    width: 100,
+    dataIndex: 'winddir',
+    edit: true,
+    editComponent: 'Select',
+    editComponentProps: {
+      options: [
+        {
+          label: '多参',
+          value: '1',
+        },
+        {
+          label: '测风',
+          value: '2',
+        },
+      ],
+    },
+  },
+  {
+    title: '是否参与计算风量',
+    width: 100,
+    dataIndex: 'windflag',
+    edit: true,
+    editComponent: 'Switch',
+    editValueMap: (value) => {
+      return value ? '是' : '否';
+    },
   },
 ];

+ 1 - 15
src/views/vent/deviceManager/damperTabel/damper.data.ts

@@ -116,7 +116,7 @@ export const formSchema: FormSchema[] = [
   },
   {
     label: '设备类型',
-    field: 'devicetype',
+    field: 'ndoortype',
     component: 'JDictSelectTag',
     componentProps: {
       dictCode: 'ndoortype',
@@ -180,20 +180,6 @@ export const formSchema: FormSchema[] = [
       placeholder: '请选择状态',
     },
   },
-  // {
-  //   label: '是否开启监测',
-  //   field: 'monitorflag',
-  //   component: 'RadioGroup',
-  //   defaultValue: 1,
-  //   componentProps: () => {
-  //     return {
-  //       options: [
-  //         { label: '是', value: 1, key: '1' },
-  //         { label: '否', value: 0, key: '2' },
-  //       ],
-  //     };
-  //   },
-  // },
   {
     label: '是否模拟数据',
     field: 'testflag',

+ 33 - 1
src/views/vent/deviceManager/fanTabel/fan.data.ts

@@ -107,7 +107,7 @@ export const formSchema: FormSchema[] = [
     componentProps: {
       dictCode: 'fantype',
       placeholder: '请选择状态',
-      stringToNumber: true,
+      // stringToNumber: true,
     },
   },
   {
@@ -120,4 +120,36 @@ export const formSchema: FormSchema[] = [
       valueField: 'nsubstationid',
     },
   },
+  {
+    label: '点表',
+    field: 'strtype',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'fanlocalkind',
+      placeholder: '请选择状态',
+    },
+  },
+  {
+    label: '监测类型',
+    field: 'monitorflag_dictText',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'monitorflag',
+      placeholder: '请选择状态',
+    },
+  },
+  {
+    label: '是否模拟数据',
+    field: 'testflag',
+    component: 'RadioGroup',
+    defaultValue: 1,
+    componentProps: () => {
+      return {
+        options: [
+          { label: '是', value: 1, key: '1' },
+          { label: '否', value: 0, key: '2' },
+        ],
+      };
+    },
+  },
 ];

+ 0 - 1
src/views/vent/deviceManager/ledTabel/index.vue

@@ -11,7 +11,6 @@
     :saveOrUpdate="saveOrUpdate"
     designScope="led-tabel"
     title="LED屏列表"
-    :showTab="true"
   />
 </template>
 

+ 0 - 1
src/views/vent/deviceManager/sensorTabel/index.vue

@@ -11,7 +11,6 @@
     :saveOrUpdate="saveOrUpdate"
     designScope="sensor-tabel"
     title="传感器列表"
-    :showTab="true"
   />
 </template>
 

+ 29 - 0
src/views/vent/deviceManager/sensorTabel/sensor.data.ts

@@ -98,6 +98,7 @@ export const formSchema: FormSchema[] = [
     componentProps: {
       dictCode: 'nsensortype',
       placeholder: '请选择状态',
+      stringToNumber: true,
     },
   },
   {
@@ -121,6 +122,34 @@ export const formSchema: FormSchema[] = [
     },
   },
   {
+    label: '所属分站',
+    field: 'nsubstationid',
+    component: 'ApiSelect',
+    componentProps: {
+      api: list,
+      labelField: 'strname',
+      valueField: 'nsubstationid',
+    },
+  },
+  {
+    label: '点表',
+    field: 'strtype',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'modelsensorkind',
+      placeholder: '请选择状态',
+    },
+  },
+  {
+    label: '监测类型',
+    field: 'monitorflag_dictText',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'monitorflag',
+      placeholder: '请选择状态',
+    },
+  },
+  {
     label: '是否模拟数据',
     field: 'testflag',
     component: 'RadioGroup',

+ 34 - 3
src/views/vent/deviceManager/windWindowTabel/ventanalyWindow.data.ts

@@ -76,7 +76,7 @@ export const searchFormSchema: FormSchema[] = [
     field: 'nwindowtype',
     component: 'JDictSelectTag',
     componentProps: {
-      dictCode: 'user_status',
+      dictCode: 'nwindowtype',
       placeholder: '请选择读写类型',
       stringToNumber: true,
     },
@@ -119,7 +119,6 @@ export const formSchema: FormSchema[] = [
     componentProps: {
       dictCode: 'nwindowtype',
       placeholder: '请选择',
-      stringToNumber: true,
     },
   },
   {
@@ -133,7 +132,7 @@ export const formSchema: FormSchema[] = [
     component: 'InputNumber',
   },
   {
-    label: '风窗道数',
+    label: '活动扇叶数量',
     field: 'nwindownum',
     component: 'InputNumber',
   },
@@ -152,4 +151,36 @@ export const formSchema: FormSchema[] = [
     field: 'finstalltunarea',
     component: 'InputNumber',
   },
+  {
+    label: '点表',
+    field: 'strtype',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'windowkind',
+      placeholder: '请选择状态',
+    },
+  },
+  {
+    label: '监测类型',
+    field: 'monitorflag_dictText',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'monitorflag',
+      placeholder: '请选择状态',
+    },
+  },
+  {
+    label: '是否模拟数据',
+    field: 'testflag',
+    component: 'RadioGroup',
+    defaultValue: 1,
+    componentProps: () => {
+      return {
+        options: [
+          { label: '是', value: 1, key: '1' },
+          { label: '否', value: 0, key: '2' },
+        ],
+      };
+    },
+  },
 ];

+ 34 - 16
src/views/vent/deviceManager/windfindingTabel/windfinding.data.ts

@@ -102,24 +102,10 @@ export const formSchema: FormSchema[] = [
   },
   {
     label: '安装位置巷道断面',
-    field: 'ftunarea',
-    component: 'InputNumber',
-  },
-  {
-    label: '风速传感器1修正系数',
-    field: 'famendv1',
-    component: 'InputNumber',
-  },
-  {
-    label: '风速传感器2修正系数',
-    field: 'famendv2',
-    component: 'InputNumber',
-  },
-  {
-    label: '风速传感器3修正系数',
-    field: 'famendv3',
+    field: 'fsectarea',
     component: 'InputNumber',
   },
+
   {
     label: '所属分站',
     field: 'nsubstationid',
@@ -130,4 +116,36 @@ export const formSchema: FormSchema[] = [
       valueField: 'nsubstationid',
     },
   },
+  {
+    label: '点表',
+    field: 'strtype',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'windrectkind',
+      placeholder: '请选择状态',
+    },
+  },
+  {
+    label: '监测类型',
+    field: 'monitorflag_dictText',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'monitorflag',
+      placeholder: '请选择状态',
+    },
+  },
+  {
+    label: '是否模拟数据',
+    field: 'testflag',
+    component: 'RadioGroup',
+    defaultValue: 1,
+    componentProps: () => {
+      return {
+        options: [
+          { label: '是', value: 1, key: '1' },
+          { label: '否', value: 0, key: '2' },
+        ],
+      };
+    },
+  },
 ];