zhuzhuanzhuan
2023-09-05 584e17205f4cabd39bbc1b5d2489a59b48aa739e
src/views/mdc/base/AlarmManager.vue
@@ -7,33 +7,46 @@
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
          <!--<a-col-->
            <!--:xl="4"-->
            <!--:lg="4"-->
            <!--:md="4"-->
            <!--:sm="24"-->
          <!--&gt;-->
            <!--<a-form-item label="设备编号">-->
              <!--<a-input-->
                <!--placeholder="请输入设备编号"-->
                <!--v-model="queryParam.equipmentId"-->
              <!--&gt;</a-input>-->
            <!--</a-form-item>-->
          <!--</a-col>-->
          <!--<a-col-->
            <!--:xl="4"-->
            <!--:lg="4"-->
            <!--:md="4"-->
            <!--:sm="24"-->
          <!--&gt;-->
            <!--<a-form-item label="设备名称">-->
              <!--<a-input-->
                <!--placeholder="请输入设备名称"-->
                <!--v-model="queryParam.equipmentName"-->
              <!--&gt;</a-input>-->
            <!--</a-form-item>-->
          <!--</a-col>-->
          <a-col
            :xl="4"
            :lg="4"
            :md="4"
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="设备编号">
              <a-input
                placeholder="请输入设备编号"
                v-model="queryParam.equipmentId"
              ></a-input>
            <a-form-item label="控制系统类型">
              <j-dict-select-tag
                placeholder="请选择控制系统类型"
                v-model="queryParam.driveType"
                dictCode="mdc_driveType"
              />
            </a-form-item>
          </a-col>
          <a-col
            :xl="4"
            :lg="4"
            :md="4"
            :sm="24"
          >
            <a-form-item label="设备名称">
              <a-input
                placeholder="请输入设备名称"
                v-model="queryParam.equipmentName"
              ></a-input>
            </a-form-item>
          </a-col>
            <a-col
              :xl="4"
              :lg="4"
@@ -53,10 +66,10 @@
              :md="4"
              :sm="24"
            >
              <a-form-item label="报警描述">
              <a-form-item label="报警内容">
                <a-input
                  placeholder="请输入报警描述"
                  v-model="queryParam.alarmDescription"
                  placeholder="请输入报警内容"
                  v-model="queryParam.alarmContent"
                ></a-input>
              </a-form-item>
            </a-col>
@@ -102,12 +115,12 @@
        @click="handleAddTRype"
        type="primary"
        icon="plus"
      >驱动新增</a-button>
      <a-button
        @click="handleAdd"
        type="primary"
        icon="plus"
      >设备新增</a-button>
      >新增</a-button>
      <!--<a-button-->
        <!--@click="handleAdd"-->
        <!--type="primary"-->
        <!--icon="plus"-->
      <!--&gt;设备新增</a-button>-->
      <!--<a-upload-->
        <!--name="file"-->
        <!--:showUploadList="false"-->
@@ -223,18 +236,18 @@
              return parseInt(index) + 1;
            }
          },
          {
            title: '设备编号',
            align: "center",
            // sorter: true,
            dataIndex: 'equipmentId'
          },
          {
            title: '设备名称',
            align: "center",
            // sorter: true,
            dataIndex: 'equipmentName'
          },
          // {
          //   title: '设备编号',
          //   align: "center",
          //   // sorter: true,
          //   dataIndex: 'equipmentId'
          // },
          // {
          //   title: '设备名称',
          //   align: "center",
          //   // sorter: true,
          //   dataIndex: 'equipmentName'
          // },
          {
            title: '报警号',
            align: "center",
@@ -242,10 +255,10 @@
            dataIndex: 'alarmCode'
          },
          {
            title: '报警描述',
            title: '报警内容',
            align: "center",
            // sorter: true,
            dataIndex: 'alarmDescription'
            dataIndex: 'alarmContent'
          },
          {
@@ -254,11 +267,17 @@
            // sorter: true,
            dataIndex: 'driveType'
          },
          // {
          //   title: '是否过滤',
          //   align: "center",
          //   dataIndex: 'isUse',
          //   customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isUse'], text) : ''),
          // },
          {
            dataIndex:'isUse_dictText',
            title: '是否过滤',
            align: "center",
            dataIndex: 'isUse',
            customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isUse'], text) : ''),
           // dictCode:'alarm_is_use'
          },
          {
            title: '操作',
@@ -270,9 +289,9 @@
          }
        ],
        url: {
          list: "/mdc/alarmInfo/page",
          delete: "/mdc/alarmInfo/delete",
          deleteBatch: "/mdc/alarmInfo/deleteBatch",
          list: "/mdc/mdcAlarmInfo/list",
          delete: "/mdc/mdcAlarmInfo/delete",
          deleteBatch: "/mdc/mdcAlarmInfo/deleteBatch",
          importExcelUrl: "mdc/mdcDriveTypeParamConfig/importExcel",
        },
@@ -281,7 +300,7 @@
      }
    },
    created() {
      this.$set(this.dictOptions, 'isUse', [{ text: '是', value: '1' }, { text: '否', value: '2' }])
      this.$set(this.dictOptions, 'isUse', [{ text: '是', value: '0' }, { text: '否', value: '-1' }])
      this.getSuperFieldList();
    },
    computed: {
@@ -305,9 +324,8 @@
      },
      getSuperFieldList() {
        let fieldList = [];
        fieldList.push({ type: 'string', value: 'equipmentId', text: '设备编号', dictCode: '' })
        fieldList.push({ type: 'string', value: 'alarmCode', text: '报警号', dictCode: '' })
        fieldList.push({ type: 'string', value: 'alarmDescription', text: '报警描述', dictCode: '' })
        fieldList.push({ type: 'string', value: 'alarmDescription', text: '报警内容', dictCode: '' })
        fieldList.push({ type: 'int', value: 'driveType', text: '设备驱动类型', dictCode: '' })
        fieldList.push({ type: 'switch', value: 'isUse', text: '是否过滤' })
        this.superFieldList = fieldList