SunZehao 4 місяців тому
батько
коміт
56ec477f49

+ 113 - 110
src/views/IntegratedAlarm/alarmConfig/components/custom_components.vue

@@ -248,131 +248,134 @@
         </el-col>
       </el-row>
       <el-form-item style="width: 100%">
-        <el-button
-          type="primary"
-          style="margin-right: 16px"
-          ref="buttonRef"
-          size="mini"
-          @click.stop="
-            () => {
-              lPopVisible = !lPopVisible;
-              setTableCheckbox();
-            }
-          "
-          >修改排查方案添\删除</el-button
-        >
         <el-popover
           :visible="lPopVisible"
           placement="right-end"
           :width="1250"
           trigger="manual"
           popper-class="alDioPop"
-          :effect="$store.state.theme ? 'light' : 'dark'"
           :hide-after="0"
           ref="popoverRef"
           :virtual-ref="buttonRef"
         >
-          <el-table
-            ref="multipleTableRef"
-            :max-height="550"
-            width="100%"
-            :data="state.alarmMapList"
-            @selection-change="handleSelectionChange"
-            stripe
-            border
-          >
-            <el-table-column type="selection" width="55" align="center" />
-            <el-table-column
-              label="类型"
-              prop="types"
-              align="center"
-              width="120px"
-              show-overflow-tooltip
-              column-key="types"
-              :filters="getFilters('types')"
-              :filter-method="filterHandler"
-            ></el-table-column>
-            <el-table-column
-              label="名称"
-              prop="name"
-              align="center"
-              width="200px"
-              column-key="name"
-              :filters="getFilters('name')"
-              :filter-method="filterHandler"
-            ></el-table-column>
-            <el-table-column
-              label="排查步骤"
-              prop="troubleMethod"
-              align="left"
+            <template #reference>
+            <el-button
+                type="primary"
+                style="margin-right: 16px"
+                ref="buttonRef"
+                size="mini"
+                @click.stop="
+                    () => {
+                    lPopVisible = !lPopVisible;
+                    setTableCheckbox();
+                    }
+                "
+                >修改排查方案添\删除</el-button
+                >
+            </template>
+            <div class="warn-table">
+            <el-table
+                ref="multipleTableRef"
+                :max-height="550"
+                width="100%"
+                :data="state.alarmMapList"
+                @selection-change="handleSelectionChange"
+                stripe
+                border
             >
-              <template #default="scope">
-                <template v-if="Array.isArray(splitStr(scope.row.troubleMethod))">
-                  <p
-                    v-for="(item, index) in splitStr(scope.row.troubleMethod)"
-                    :key="index"
-                  >
-                    {{ index + 1 }}. {{ item }}
-                  </p>
+                <el-table-column type="selection" width="55" align="center" />
+                <el-table-column
+                label="类型"
+                prop="types"
+                align="center"
+                width="120px"
+                show-overflow-tooltip
+                column-key="types"
+                :filters="getFilters('types')"
+                :filter-method="filterHandler"
+                ></el-table-column>
+                <el-table-column
+                label="名称"
+                prop="name"
+                align="center"
+                width="200px"
+                column-key="name"
+                :filters="getFilters('name')"
+                :filter-method="filterHandler"
+                ></el-table-column>
+                <el-table-column
+                label="排查步骤"
+                prop="troubleMethod"
+                align="left"
+                >
+                <template #default="scope">
+                    <template v-if="Array.isArray(splitStr(scope.row.troubleMethod))">
+                    <p
+                        v-for="(item, index) in splitStr(scope.row.troubleMethod)"
+                        :key="index"
+                    >
+                        {{ index + 1 }}. {{ item }}
+                    </p>
+                    </template>
+                    <p v-else>
+                    {{ scope.row.troubleMethod }}
+                    </p>
                 </template>
-                <p v-else>
-                  {{ scope.row.troubleMethod }}
-                </p>
-              </template>
-            </el-table-column>
-            <el-table-column
-              label="检修方案"
-              prop="processMethod"
-              align="left"
-            >
-              <template #default="scope">
-                <template v-if="Array.isArray(splitStr(scope.row.processMethod))">
-                  <p
-                    v-for="(item, index) in splitStr(scope.row.processMethod)"
-                    :key="index"
-                  >
-                    {{ index + 1 }}. {{ item }}
-                  </p>
+                </el-table-column>
+                <el-table-column
+                label="检修方案"
+                prop="processMethod"
+                align="left"
+                >
+                <template #default="scope">
+                    <template v-if="Array.isArray(splitStr(scope.row.processMethod))">
+                    <p
+                        v-for="(item, index) in splitStr(scope.row.processMethod)"
+                        :key="index"
+                    >
+                        {{ index + 1 }}. {{ item }}
+                    </p>
+                    </template>
+                    <p v-else>
+                    {{ scope.row.processMethod }}
+                    </p>
                 </template>
-                <p v-else>
-                  {{ scope.row.processMethod }}
-                </p>
-              </template>
-            </el-table-column>
-            <el-table-column
-              label="所需工具"
-              prop="tools"
-              align="left"
-              width="120px"
-            >
-              <template #default="scope">
-                <template v-if="Array.isArray(splitStr(scope.row.tools))">
-                  <p v-for="(item, index) in splitStr(scope.row.tools)" :key="index">
-                    {{ index + 1 }}. {{ item }}
-                  </p>
+                </el-table-column>
+                <el-table-column
+                label="所需工具"
+                prop="tools"
+                align="left"
+                width="120px"
+                >
+                <template #default="scope">
+                    <template v-if="Array.isArray(splitStr(scope.row.tools))">
+                    <p v-for="(item, index) in splitStr(scope.row.tools)" :key="index">
+                        {{ index + 1 }}. {{ item }}
+                    </p>
+                    </template>
+                    <p v-else>
+                    {{ scope.row.tools }}
+                    </p>
                 </template>
-                <p v-else>
-                  {{ scope.row.tools }}
-                </p>
-              </template>
-            </el-table-column>
-            <el-table-column
-              label="备品备件"
-              prop="spareParts"
-              align="left"
-            >
-              <template #default="scope">
-                <template v-if="Array.isArray(splitStr(scope.row.spareParts))">
-                  <p v-for="(item, index) in splitStr(scope.row.spareParts)" :key="index">
-                    {{ index + 1 }}. {{ item }}
-                  </p>
+                </el-table-column>
+                <el-table-column
+                label="备品备件"
+                prop="spareParts"
+                align="left"
+                >
+                <template #default="scope">
+                    <template v-if="Array.isArray(splitStr(scope.row.spareParts))">
+                    <p v-for="(item, index) in splitStr(scope.row.spareParts)" :key="index">
+                        {{ index + 1 }}. {{ item }}
+                    </p>
+                    </template>
+                    <p v-else>
+                    {{ scope.row.spareParts }}
+                    </p>
                 </template>
-                <p v-else>
-                  {{ scope.row.spareParts }}
-                </p>
-              </template>
-            </el-table-column>
-          </el-table>
+                </el-table-column>
+            </el-table>
+            </div>
         </el-popover>
         <el-table
           width="100%"

+ 4 - 2
src/views/IntegratedAlarm/alarmConfig/customConfig/index.vue

@@ -11,9 +11,10 @@
         <el-button class="buttons" size="mini" round @click="outExe">
           模板下载</el-button
         >
+          <!-- :action="url + '/alertrule/import'" -->
         <el-upload
           style="display: inline; margin-left: 10px"
-          :action="url + 'alertrule/import'"
+          :action="`${$store.state.baseURL}/alertrule/import`"
           :show-file-list="false"
           :on-success="handleSuccess"
           :on-progress="handleProgress"
@@ -1996,7 +1997,8 @@ const handleSuccess = (response) => {
   }
 };
 // 批量导入中
-const handleProgress = (response) => {};
+const handleProgress = (response) => {
+};
 // 批量导入失败
 const handleError = (response) => {
   ElMessage.success("导入失败!");